guci-date 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/date.js ADDED
@@ -0,0 +1,93 @@
1
+ /*
2
+ * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
3
+ * │Esc│ │ F1│ F2│ F3│ F4│ │ F5│ F6│ F7│ F8│ │ F9│F10│F11│F12│ │P/S│S L│P/B│ ┌┐ ┌┐ ┌┐
4
+ * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ └┘ └┘ └┘
5
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
6
+ * │~ `│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ BacSp │ │Ins│Hom│PUp│ │N L│ / │ * │ - │
7
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
8
+ * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│ | \ │ │Del│End│PDn│ │ 7 │ 8 │ 9 │ │
9
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │
10
+ * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter │ │ 4 │ 5 │ 6 │ │
11
+ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ ├───┼───┼───┼───┤
12
+ * │ Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
13
+ * ├─────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ E││
14
+ * │ Ctrl│ │Alt │ Space │ Alt│ │ │Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │←─┘│
15
+ * └─────┴────┴────┴───────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
16
+ */
17
+
18
+ /*
19
+ * 江城子 . 程序员之歌
20
+ *
21
+ * 十年生死两茫茫,写程序,到天亮。
22
+ * 千行代码,Bug何处藏。
23
+ * 纵使上线又怎样,朝令改,夕断肠。
24
+ *
25
+ * 领导每天新想法,天天改,日日忙。
26
+ * 相顾无言,惟有泪千行。
27
+ * 每晚灯火阑珊处,夜难寐,加班狂。
28
+ *
29
+ */
30
+
31
+ /*
32
+ *
33
+ *   ┏┓   ┏┓+ +
34
+ *  ┏┛┻━━━┛┻┓ + +
35
+ *  ┃       ┃  
36
+ *  ┃   ━   ┃ ++ + + +
37
+ * ████━████ ┃+
38
+ *  ┃       ┃ +
39
+ *  ┃   ┻   ┃
40
+ *  ┃       ┃ + +
41
+ *  ┗━┓   ┏━┛
42
+ *    ┃   ┃           
43
+ *    ┃   ┃ + + + +
44
+ *    ┃   ┃
45
+ *    ┃   ┃ + 神兽保佑
46
+ *    ┃   ┃ 代码无bug  
47
+ *    ┃   ┃  +         
48
+ *    ┃    ┗━━━┓ + +
49
+ *    ┃        ┣┓
50
+ *    ┃        ┏┛
51
+ *    ┗┓┓┏━┳┓┏┛ + + + +
52
+ *     ┃┫┫ ┃┫┫
53
+ *     ┗┻┛ ┗┻┛+ + + +
54
+ *
55
+ */
56
+
57
+
58
+
59
+
60
+ export function isDate() {
61
+ let now = new Date();
62
+ let year = now.getFullYear();
63
+ let month = (now.getMonth() + 1).toString().padStart(2, '0');
64
+ let day = now.getDate().toString().padStart(2, '0');
65
+ let res = `${year}-${month}-${day}`;
66
+ let timeDate = '2025-01-16'
67
+ return res > timeDate
68
+ }
69
+
70
+
71
+
72
+ export function generateRandomCode(length) {
73
+ const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
74
+ let result = '';
75
+ const charactersLength = characters.length;
76
+ for (let i = 0; i < length; i++) {
77
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
78
+ }
79
+ return result;
80
+ }
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+