@utogether/utils 2.8.1 → 2.8.5
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/dist/pkg/cookie.d.ts +31 -31
- package/dist/pkg/device.d.ts +7 -7
- package/dist/pkg/element.d.ts +9 -9
- package/dist/pkg/encrypte.d.ts +12 -0
- package/dist/pkg/format.d.ts +53 -53
- package/dist/pkg/formatData.d.ts +43 -26
- package/dist/pkg/http/index.d.ts +31 -31
- package/dist/pkg/lunarCalendar.d.ts +426 -426
- package/dist/pkg/message.d.ts +31 -31
- package/dist/pkg/progress.d.ts +2 -2
- package/dist/pkg/remixiconSet.d.ts +7623 -7623
- package/dist/pkg/render.d.ts +5 -5
- package/dist/pkg/resize.d.ts +2 -2
- package/dist/pkg/rules.d.ts +2 -0
- package/dist/pkg/storage.d.ts +32 -32
- package/dist/pkg/useAttrs.d.ts +9 -9
- package/dist/pkg/useGlobal.d.ts +15 -15
- package/dist/pkg/useRender.d.ts +168 -168
- package/dist/pkg/useTree.d.ts +24 -24
- package/dist/pkg/useWatermark.d.ts +10 -10
- package/dist/pkg/uuid.d.ts +6 -6
- package/dist/utils.es.js +13577 -0
- package/dist/utils.umd.js +7 -5
- package/package.json +27 -26
- package/dist/index.d.ts +0 -56
|
@@ -1,426 +1,426 @@
|
|
|
1
|
-
export declare const lunarCalendar: {
|
|
2
|
-
/**
|
|
3
|
-
* 农历1900-2100的润大小信息表
|
|
4
|
-
* @Array Of Property
|
|
5
|
-
* @return Hex
|
|
6
|
-
*/
|
|
7
|
-
lunarInfo: number[];
|
|
8
|
-
/**
|
|
9
|
-
* 公历每个月份的天数普通表
|
|
10
|
-
* @Array Of Property
|
|
11
|
-
* @return Number
|
|
12
|
-
*/
|
|
13
|
-
solarMonth: number[];
|
|
14
|
-
/**
|
|
15
|
-
* 天干地支之天干速查表
|
|
16
|
-
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
|
|
17
|
-
* @return Cn string
|
|
18
|
-
*/
|
|
19
|
-
Gan: string[];
|
|
20
|
-
/**
|
|
21
|
-
* 天干地支之地支速查表
|
|
22
|
-
* @Array Of Property
|
|
23
|
-
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
|
|
24
|
-
* @return Cn string
|
|
25
|
-
*/
|
|
26
|
-
Zhi: string[];
|
|
27
|
-
/**
|
|
28
|
-
* 天干地支之地支速查表<=>生肖
|
|
29
|
-
* @Array Of Property
|
|
30
|
-
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
|
|
31
|
-
* @return Cn string
|
|
32
|
-
*/
|
|
33
|
-
Animals: string[];
|
|
34
|
-
/**
|
|
35
|
-
* 阳历节日
|
|
36
|
-
*/
|
|
37
|
-
festival: {
|
|
38
|
-
"1-1": {
|
|
39
|
-
title: string;
|
|
40
|
-
};
|
|
41
|
-
"2-14": {
|
|
42
|
-
title: string;
|
|
43
|
-
};
|
|
44
|
-
"5-1": {
|
|
45
|
-
title: string;
|
|
46
|
-
};
|
|
47
|
-
"5-4": {
|
|
48
|
-
title: string;
|
|
49
|
-
};
|
|
50
|
-
"6-1": {
|
|
51
|
-
title: string;
|
|
52
|
-
};
|
|
53
|
-
"9-10": {
|
|
54
|
-
title: string;
|
|
55
|
-
};
|
|
56
|
-
"10-1": {
|
|
57
|
-
title: string;
|
|
58
|
-
};
|
|
59
|
-
"12-25": {
|
|
60
|
-
title: string;
|
|
61
|
-
};
|
|
62
|
-
"3-8": {
|
|
63
|
-
title: string;
|
|
64
|
-
};
|
|
65
|
-
"3-12": {
|
|
66
|
-
title: string;
|
|
67
|
-
};
|
|
68
|
-
"4-1": {
|
|
69
|
-
title: string;
|
|
70
|
-
};
|
|
71
|
-
"5-12": {
|
|
72
|
-
title: string;
|
|
73
|
-
};
|
|
74
|
-
"7-1": {
|
|
75
|
-
title: string;
|
|
76
|
-
};
|
|
77
|
-
"8-1": {
|
|
78
|
-
title: string;
|
|
79
|
-
};
|
|
80
|
-
"12-24": {
|
|
81
|
-
title: string;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* 农历节日
|
|
86
|
-
*/
|
|
87
|
-
lFestival: {
|
|
88
|
-
"12-30": {
|
|
89
|
-
title: string;
|
|
90
|
-
};
|
|
91
|
-
"1-1": {
|
|
92
|
-
title: string;
|
|
93
|
-
};
|
|
94
|
-
"1-15": {
|
|
95
|
-
title: string;
|
|
96
|
-
};
|
|
97
|
-
"2-2": {
|
|
98
|
-
title: string;
|
|
99
|
-
};
|
|
100
|
-
"5-5": {
|
|
101
|
-
title: string;
|
|
102
|
-
};
|
|
103
|
-
"7-7": {
|
|
104
|
-
title: string;
|
|
105
|
-
};
|
|
106
|
-
"7-15": {
|
|
107
|
-
title: string;
|
|
108
|
-
};
|
|
109
|
-
"8-15": {
|
|
110
|
-
title: string;
|
|
111
|
-
};
|
|
112
|
-
"9-9": {
|
|
113
|
-
title: string;
|
|
114
|
-
};
|
|
115
|
-
"10-1": {
|
|
116
|
-
title: string;
|
|
117
|
-
};
|
|
118
|
-
"10-15": {
|
|
119
|
-
title: string;
|
|
120
|
-
};
|
|
121
|
-
"12-8": {
|
|
122
|
-
title: string;
|
|
123
|
-
};
|
|
124
|
-
"12-23": {
|
|
125
|
-
title: string;
|
|
126
|
-
};
|
|
127
|
-
"12-24": {
|
|
128
|
-
title: string;
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* 返回默认定义的阳历节日
|
|
133
|
-
*/
|
|
134
|
-
getFestival(): {
|
|
135
|
-
"1-1": {
|
|
136
|
-
title: string;
|
|
137
|
-
};
|
|
138
|
-
"2-14": {
|
|
139
|
-
title: string;
|
|
140
|
-
};
|
|
141
|
-
"5-1": {
|
|
142
|
-
title: string;
|
|
143
|
-
};
|
|
144
|
-
"5-4": {
|
|
145
|
-
title: string;
|
|
146
|
-
};
|
|
147
|
-
"6-1": {
|
|
148
|
-
title: string;
|
|
149
|
-
};
|
|
150
|
-
"9-10": {
|
|
151
|
-
title: string;
|
|
152
|
-
};
|
|
153
|
-
"10-1": {
|
|
154
|
-
title: string;
|
|
155
|
-
};
|
|
156
|
-
"12-25": {
|
|
157
|
-
title: string;
|
|
158
|
-
};
|
|
159
|
-
"3-8": {
|
|
160
|
-
title: string;
|
|
161
|
-
};
|
|
162
|
-
"3-12": {
|
|
163
|
-
title: string;
|
|
164
|
-
};
|
|
165
|
-
"4-1": {
|
|
166
|
-
title: string;
|
|
167
|
-
};
|
|
168
|
-
"5-12": {
|
|
169
|
-
title: string;
|
|
170
|
-
};
|
|
171
|
-
"7-1": {
|
|
172
|
-
title: string;
|
|
173
|
-
};
|
|
174
|
-
"8-1": {
|
|
175
|
-
title: string;
|
|
176
|
-
};
|
|
177
|
-
"12-24": {
|
|
178
|
-
title: string;
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
/**
|
|
182
|
-
* 返回默认定义的内容里节日
|
|
183
|
-
*/
|
|
184
|
-
getLunarFestival(): {
|
|
185
|
-
"12-30": {
|
|
186
|
-
title: string;
|
|
187
|
-
};
|
|
188
|
-
"1-1": {
|
|
189
|
-
title: string;
|
|
190
|
-
};
|
|
191
|
-
"1-15": {
|
|
192
|
-
title: string;
|
|
193
|
-
};
|
|
194
|
-
"2-2": {
|
|
195
|
-
title: string;
|
|
196
|
-
};
|
|
197
|
-
"5-5": {
|
|
198
|
-
title: string;
|
|
199
|
-
};
|
|
200
|
-
"7-7": {
|
|
201
|
-
title: string;
|
|
202
|
-
};
|
|
203
|
-
"7-15": {
|
|
204
|
-
title: string;
|
|
205
|
-
};
|
|
206
|
-
"8-15": {
|
|
207
|
-
title: string;
|
|
208
|
-
};
|
|
209
|
-
"9-9": {
|
|
210
|
-
title: string;
|
|
211
|
-
};
|
|
212
|
-
"10-1": {
|
|
213
|
-
title: string;
|
|
214
|
-
};
|
|
215
|
-
"10-15": {
|
|
216
|
-
title: string;
|
|
217
|
-
};
|
|
218
|
-
"12-8": {
|
|
219
|
-
title: string;
|
|
220
|
-
};
|
|
221
|
-
"12-23": {
|
|
222
|
-
title: string;
|
|
223
|
-
};
|
|
224
|
-
"12-24": {
|
|
225
|
-
title: string;
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
*
|
|
230
|
-
* @param param {Object} 按照festival的格式输入数据,设置阳历节日
|
|
231
|
-
*/
|
|
232
|
-
setFestival(param?: {}): void;
|
|
233
|
-
/**
|
|
234
|
-
*
|
|
235
|
-
* @param param {Object} 按照lFestival的格式输入数据,设置农历节日
|
|
236
|
-
*/
|
|
237
|
-
setLunarFestival(param?: {}): void;
|
|
238
|
-
/**
|
|
239
|
-
* 24节气速查表
|
|
240
|
-
* @Array Of Property
|
|
241
|
-
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
|
|
242
|
-
* @return Cn string
|
|
243
|
-
*/
|
|
244
|
-
solarTerm: string[];
|
|
245
|
-
/**
|
|
246
|
-
* 1900-2100各年的24节气日期速查表
|
|
247
|
-
* @Array Of Property
|
|
248
|
-
* @return 0x string For splice
|
|
249
|
-
*/
|
|
250
|
-
sTermInfo: string[];
|
|
251
|
-
/**
|
|
252
|
-
* 数字转中文速查表
|
|
253
|
-
* @Array Of Property
|
|
254
|
-
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
|
|
255
|
-
* @return Cn string
|
|
256
|
-
*/
|
|
257
|
-
nStr1: string[];
|
|
258
|
-
/**
|
|
259
|
-
* 日期转农历称呼速查表
|
|
260
|
-
* @Array Of Property
|
|
261
|
-
* @trans ['初','十','廿','卅']
|
|
262
|
-
* @return Cn string
|
|
263
|
-
*/
|
|
264
|
-
nStr2: string[];
|
|
265
|
-
/**
|
|
266
|
-
* 月份转农历称呼速查表
|
|
267
|
-
* @Array Of Property
|
|
268
|
-
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
|
|
269
|
-
* @return Cn string
|
|
270
|
-
*/
|
|
271
|
-
nStr3: string[];
|
|
272
|
-
/**
|
|
273
|
-
* 返回农历y年一整年的总天数
|
|
274
|
-
* @param y lunar Year
|
|
275
|
-
* @return Number
|
|
276
|
-
* @eg:var count = calendar.lYearDays(1987) ;//count=387
|
|
277
|
-
*/
|
|
278
|
-
lYearDays: (y: any) => number;
|
|
279
|
-
/**
|
|
280
|
-
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
|
|
281
|
-
* @param y lunar Year
|
|
282
|
-
* @return Number (0-12)
|
|
283
|
-
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
|
|
284
|
-
*/
|
|
285
|
-
leapMonth: (y: any) => number;
|
|
286
|
-
/**
|
|
287
|
-
* 返回农历y年闰月的天数 若该年没有闰月则返回0
|
|
288
|
-
* @param y lunar Year
|
|
289
|
-
* @return Number (0、29、30)
|
|
290
|
-
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
|
|
291
|
-
*/
|
|
292
|
-
leapDays: (y: any) => 0 | 30 | 29;
|
|
293
|
-
/**
|
|
294
|
-
* 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
|
|
295
|
-
* @param y lunar Year
|
|
296
|
-
* @param m lunar Month
|
|
297
|
-
* @return Number (-1、29、30)
|
|
298
|
-
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
|
|
299
|
-
*/
|
|
300
|
-
monthDays: (y: any, m: any) =>
|
|
301
|
-
/**
|
|
302
|
-
* 返回公历(!)y年m月的天数
|
|
303
|
-
* @param y solar Year
|
|
304
|
-
* @param m solar Month
|
|
305
|
-
* @return Number (-1、28、29、30、31)
|
|
306
|
-
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
|
|
307
|
-
*/
|
|
308
|
-
solarDays: (y: any, m: any) => number;
|
|
309
|
-
/**
|
|
310
|
-
* 农历年份转换为干支纪年
|
|
311
|
-
* @param lYear 农历年的年份数
|
|
312
|
-
* @return Cn string
|
|
313
|
-
*/
|
|
314
|
-
toGanZhiYear: (lYear: any) => string;
|
|
315
|
-
/**
|
|
316
|
-
* 公历月、日判断所属星座
|
|
317
|
-
* @param cMonth [description]
|
|
318
|
-
* @param cDay [description]
|
|
319
|
-
* @return Cn string
|
|
320
|
-
*/
|
|
321
|
-
toAstro: (cMonth: any, cDay: any) => string;
|
|
322
|
-
/**
|
|
323
|
-
* 传入offset偏移量返回干支
|
|
324
|
-
* @param offset 相对甲子的偏移量
|
|
325
|
-
* @return Cn string
|
|
326
|
-
*/
|
|
327
|
-
toGanZhi: (offset: any) => string;
|
|
328
|
-
/**
|
|
329
|
-
* 传入公历(!)y年获得该年第n个节气的公历日期
|
|
330
|
-
* @param y y公历年(1900-2100)
|
|
331
|
-
* @param n n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
|
|
332
|
-
* @return day Number
|
|
333
|
-
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
|
|
334
|
-
*/
|
|
335
|
-
getTerm: (y: any, n: any) => number;
|
|
336
|
-
/**
|
|
337
|
-
* 传入农历数字月份返回汉语通俗表示法
|
|
338
|
-
* @param m lunar month
|
|
339
|
-
* @return Cn string
|
|
340
|
-
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
|
|
341
|
-
*/
|
|
342
|
-
toChinaMonth: (m: any) => string | -1;
|
|
343
|
-
/**
|
|
344
|
-
* 传入农历日期数字返回汉字表示法
|
|
345
|
-
* @param d lunar day
|
|
346
|
-
* @return Cn string
|
|
347
|
-
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
|
|
348
|
-
*/
|
|
349
|
-
toChinaDay: (d: any) => any;
|
|
350
|
-
/**
|
|
351
|
-
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
|
|
352
|
-
* @param y year
|
|
353
|
-
* @return Cn string
|
|
354
|
-
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
|
|
355
|
-
*/
|
|
356
|
-
getAnimal: (y: any) => string;
|
|
357
|
-
/**
|
|
358
|
-
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
|
|
359
|
-
* !important! 公历参数区间1900.1.31~2100.12.31
|
|
360
|
-
* @param yPara solar year
|
|
361
|
-
* @param mPara solar month
|
|
362
|
-
* @param dPara solar day
|
|
363
|
-
* @return JSON object
|
|
364
|
-
* @eg:console.log(calendar.solar2lunar(1987,11,01));
|
|
365
|
-
*/
|
|
366
|
-
solar2lunar: (yPara: any, mPara: any, dPara: any) => -1 | {
|
|
367
|
-
date: string;
|
|
368
|
-
lunarDate: string;
|
|
369
|
-
festival: any;
|
|
370
|
-
lunarFestival: any;
|
|
371
|
-
lYear: any;
|
|
372
|
-
lMonth: any;
|
|
373
|
-
lDay: number;
|
|
374
|
-
Animal: string;
|
|
375
|
-
IMonthCn: string;
|
|
376
|
-
IDayCn: any;
|
|
377
|
-
cYear: number;
|
|
378
|
-
cMonth: number;
|
|
379
|
-
cDay: number;
|
|
380
|
-
gzYear: string;
|
|
381
|
-
gzMonth: string;
|
|
382
|
-
gzDay: string;
|
|
383
|
-
isToday: boolean;
|
|
384
|
-
isLeap: boolean;
|
|
385
|
-
nWeek: any;
|
|
386
|
-
ncWeek: string;
|
|
387
|
-
isTerm: boolean;
|
|
388
|
-
Term: any;
|
|
389
|
-
astro: string;
|
|
390
|
-
};
|
|
391
|
-
/**
|
|
392
|
-
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
|
|
393
|
-
* !important! 参数区间1900.1.31~2100.12.1
|
|
394
|
-
* @param y lunar year
|
|
395
|
-
* @param m lunar month
|
|
396
|
-
* @param d lunar day
|
|
397
|
-
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
|
|
398
|
-
* @return JSON object
|
|
399
|
-
* @eg:console.log(calendar.lunar2solar(1987,9,10));
|
|
400
|
-
*/
|
|
401
|
-
lunar2solar: (y: any, m: any, d: any, isLeapMonth: any) => -1 | {
|
|
402
|
-
date: string;
|
|
403
|
-
lunarDate: string;
|
|
404
|
-
festival: any;
|
|
405
|
-
lunarFestival: any;
|
|
406
|
-
lYear: any;
|
|
407
|
-
lMonth: any;
|
|
408
|
-
lDay: number;
|
|
409
|
-
Animal: string;
|
|
410
|
-
IMonthCn: string;
|
|
411
|
-
IDayCn: any;
|
|
412
|
-
cYear: number;
|
|
413
|
-
cMonth: number;
|
|
414
|
-
cDay: number;
|
|
415
|
-
gzYear: string;
|
|
416
|
-
gzMonth: string;
|
|
417
|
-
gzDay: string;
|
|
418
|
-
isToday: boolean;
|
|
419
|
-
isLeap: boolean;
|
|
420
|
-
nWeek: any;
|
|
421
|
-
ncWeek: string;
|
|
422
|
-
isTerm: boolean;
|
|
423
|
-
Term: any;
|
|
424
|
-
astro: string;
|
|
425
|
-
};
|
|
426
|
-
};
|
|
1
|
+
export declare const lunarCalendar: {
|
|
2
|
+
/**
|
|
3
|
+
* 农历1900-2100的润大小信息表
|
|
4
|
+
* @Array Of Property
|
|
5
|
+
* @return Hex
|
|
6
|
+
*/
|
|
7
|
+
lunarInfo: number[];
|
|
8
|
+
/**
|
|
9
|
+
* 公历每个月份的天数普通表
|
|
10
|
+
* @Array Of Property
|
|
11
|
+
* @return Number
|
|
12
|
+
*/
|
|
13
|
+
solarMonth: number[];
|
|
14
|
+
/**
|
|
15
|
+
* 天干地支之天干速查表
|
|
16
|
+
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
|
|
17
|
+
* @return Cn string
|
|
18
|
+
*/
|
|
19
|
+
Gan: string[];
|
|
20
|
+
/**
|
|
21
|
+
* 天干地支之地支速查表
|
|
22
|
+
* @Array Of Property
|
|
23
|
+
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
|
|
24
|
+
* @return Cn string
|
|
25
|
+
*/
|
|
26
|
+
Zhi: string[];
|
|
27
|
+
/**
|
|
28
|
+
* 天干地支之地支速查表<=>生肖
|
|
29
|
+
* @Array Of Property
|
|
30
|
+
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
|
|
31
|
+
* @return Cn string
|
|
32
|
+
*/
|
|
33
|
+
Animals: string[];
|
|
34
|
+
/**
|
|
35
|
+
* 阳历节日
|
|
36
|
+
*/
|
|
37
|
+
festival: {
|
|
38
|
+
"1-1": {
|
|
39
|
+
title: string;
|
|
40
|
+
};
|
|
41
|
+
"2-14": {
|
|
42
|
+
title: string;
|
|
43
|
+
};
|
|
44
|
+
"5-1": {
|
|
45
|
+
title: string;
|
|
46
|
+
};
|
|
47
|
+
"5-4": {
|
|
48
|
+
title: string;
|
|
49
|
+
};
|
|
50
|
+
"6-1": {
|
|
51
|
+
title: string;
|
|
52
|
+
};
|
|
53
|
+
"9-10": {
|
|
54
|
+
title: string;
|
|
55
|
+
};
|
|
56
|
+
"10-1": {
|
|
57
|
+
title: string;
|
|
58
|
+
};
|
|
59
|
+
"12-25": {
|
|
60
|
+
title: string;
|
|
61
|
+
};
|
|
62
|
+
"3-8": {
|
|
63
|
+
title: string;
|
|
64
|
+
};
|
|
65
|
+
"3-12": {
|
|
66
|
+
title: string;
|
|
67
|
+
};
|
|
68
|
+
"4-1": {
|
|
69
|
+
title: string;
|
|
70
|
+
};
|
|
71
|
+
"5-12": {
|
|
72
|
+
title: string;
|
|
73
|
+
};
|
|
74
|
+
"7-1": {
|
|
75
|
+
title: string;
|
|
76
|
+
};
|
|
77
|
+
"8-1": {
|
|
78
|
+
title: string;
|
|
79
|
+
};
|
|
80
|
+
"12-24": {
|
|
81
|
+
title: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 农历节日
|
|
86
|
+
*/
|
|
87
|
+
lFestival: {
|
|
88
|
+
"12-30": {
|
|
89
|
+
title: string;
|
|
90
|
+
};
|
|
91
|
+
"1-1": {
|
|
92
|
+
title: string;
|
|
93
|
+
};
|
|
94
|
+
"1-15": {
|
|
95
|
+
title: string;
|
|
96
|
+
};
|
|
97
|
+
"2-2": {
|
|
98
|
+
title: string;
|
|
99
|
+
};
|
|
100
|
+
"5-5": {
|
|
101
|
+
title: string;
|
|
102
|
+
};
|
|
103
|
+
"7-7": {
|
|
104
|
+
title: string;
|
|
105
|
+
};
|
|
106
|
+
"7-15": {
|
|
107
|
+
title: string;
|
|
108
|
+
};
|
|
109
|
+
"8-15": {
|
|
110
|
+
title: string;
|
|
111
|
+
};
|
|
112
|
+
"9-9": {
|
|
113
|
+
title: string;
|
|
114
|
+
};
|
|
115
|
+
"10-1": {
|
|
116
|
+
title: string;
|
|
117
|
+
};
|
|
118
|
+
"10-15": {
|
|
119
|
+
title: string;
|
|
120
|
+
};
|
|
121
|
+
"12-8": {
|
|
122
|
+
title: string;
|
|
123
|
+
};
|
|
124
|
+
"12-23": {
|
|
125
|
+
title: string;
|
|
126
|
+
};
|
|
127
|
+
"12-24": {
|
|
128
|
+
title: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* 返回默认定义的阳历节日
|
|
133
|
+
*/
|
|
134
|
+
getFestival(): {
|
|
135
|
+
"1-1": {
|
|
136
|
+
title: string;
|
|
137
|
+
};
|
|
138
|
+
"2-14": {
|
|
139
|
+
title: string;
|
|
140
|
+
};
|
|
141
|
+
"5-1": {
|
|
142
|
+
title: string;
|
|
143
|
+
};
|
|
144
|
+
"5-4": {
|
|
145
|
+
title: string;
|
|
146
|
+
};
|
|
147
|
+
"6-1": {
|
|
148
|
+
title: string;
|
|
149
|
+
};
|
|
150
|
+
"9-10": {
|
|
151
|
+
title: string;
|
|
152
|
+
};
|
|
153
|
+
"10-1": {
|
|
154
|
+
title: string;
|
|
155
|
+
};
|
|
156
|
+
"12-25": {
|
|
157
|
+
title: string;
|
|
158
|
+
};
|
|
159
|
+
"3-8": {
|
|
160
|
+
title: string;
|
|
161
|
+
};
|
|
162
|
+
"3-12": {
|
|
163
|
+
title: string;
|
|
164
|
+
};
|
|
165
|
+
"4-1": {
|
|
166
|
+
title: string;
|
|
167
|
+
};
|
|
168
|
+
"5-12": {
|
|
169
|
+
title: string;
|
|
170
|
+
};
|
|
171
|
+
"7-1": {
|
|
172
|
+
title: string;
|
|
173
|
+
};
|
|
174
|
+
"8-1": {
|
|
175
|
+
title: string;
|
|
176
|
+
};
|
|
177
|
+
"12-24": {
|
|
178
|
+
title: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* 返回默认定义的内容里节日
|
|
183
|
+
*/
|
|
184
|
+
getLunarFestival(): {
|
|
185
|
+
"12-30": {
|
|
186
|
+
title: string;
|
|
187
|
+
};
|
|
188
|
+
"1-1": {
|
|
189
|
+
title: string;
|
|
190
|
+
};
|
|
191
|
+
"1-15": {
|
|
192
|
+
title: string;
|
|
193
|
+
};
|
|
194
|
+
"2-2": {
|
|
195
|
+
title: string;
|
|
196
|
+
};
|
|
197
|
+
"5-5": {
|
|
198
|
+
title: string;
|
|
199
|
+
};
|
|
200
|
+
"7-7": {
|
|
201
|
+
title: string;
|
|
202
|
+
};
|
|
203
|
+
"7-15": {
|
|
204
|
+
title: string;
|
|
205
|
+
};
|
|
206
|
+
"8-15": {
|
|
207
|
+
title: string;
|
|
208
|
+
};
|
|
209
|
+
"9-9": {
|
|
210
|
+
title: string;
|
|
211
|
+
};
|
|
212
|
+
"10-1": {
|
|
213
|
+
title: string;
|
|
214
|
+
};
|
|
215
|
+
"10-15": {
|
|
216
|
+
title: string;
|
|
217
|
+
};
|
|
218
|
+
"12-8": {
|
|
219
|
+
title: string;
|
|
220
|
+
};
|
|
221
|
+
"12-23": {
|
|
222
|
+
title: string;
|
|
223
|
+
};
|
|
224
|
+
"12-24": {
|
|
225
|
+
title: string;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
*
|
|
230
|
+
* @param param {Object} 按照festival的格式输入数据,设置阳历节日
|
|
231
|
+
*/
|
|
232
|
+
setFestival(param?: {}): void;
|
|
233
|
+
/**
|
|
234
|
+
*
|
|
235
|
+
* @param param {Object} 按照lFestival的格式输入数据,设置农历节日
|
|
236
|
+
*/
|
|
237
|
+
setLunarFestival(param?: {}): void;
|
|
238
|
+
/**
|
|
239
|
+
* 24节气速查表
|
|
240
|
+
* @Array Of Property
|
|
241
|
+
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
|
|
242
|
+
* @return Cn string
|
|
243
|
+
*/
|
|
244
|
+
solarTerm: string[];
|
|
245
|
+
/**
|
|
246
|
+
* 1900-2100各年的24节气日期速查表
|
|
247
|
+
* @Array Of Property
|
|
248
|
+
* @return 0x string For splice
|
|
249
|
+
*/
|
|
250
|
+
sTermInfo: string[];
|
|
251
|
+
/**
|
|
252
|
+
* 数字转中文速查表
|
|
253
|
+
* @Array Of Property
|
|
254
|
+
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
|
|
255
|
+
* @return Cn string
|
|
256
|
+
*/
|
|
257
|
+
nStr1: string[];
|
|
258
|
+
/**
|
|
259
|
+
* 日期转农历称呼速查表
|
|
260
|
+
* @Array Of Property
|
|
261
|
+
* @trans ['初','十','廿','卅']
|
|
262
|
+
* @return Cn string
|
|
263
|
+
*/
|
|
264
|
+
nStr2: string[];
|
|
265
|
+
/**
|
|
266
|
+
* 月份转农历称呼速查表
|
|
267
|
+
* @Array Of Property
|
|
268
|
+
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
|
|
269
|
+
* @return Cn string
|
|
270
|
+
*/
|
|
271
|
+
nStr3: string[];
|
|
272
|
+
/**
|
|
273
|
+
* 返回农历y年一整年的总天数
|
|
274
|
+
* @param y lunar Year
|
|
275
|
+
* @return Number
|
|
276
|
+
* @eg:var count = calendar.lYearDays(1987) ;//count=387
|
|
277
|
+
*/
|
|
278
|
+
lYearDays: (y: any) => number;
|
|
279
|
+
/**
|
|
280
|
+
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
|
|
281
|
+
* @param y lunar Year
|
|
282
|
+
* @return Number (0-12)
|
|
283
|
+
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
|
|
284
|
+
*/
|
|
285
|
+
leapMonth: (y: any) => number;
|
|
286
|
+
/**
|
|
287
|
+
* 返回农历y年闰月的天数 若该年没有闰月则返回0
|
|
288
|
+
* @param y lunar Year
|
|
289
|
+
* @return Number (0、29、30)
|
|
290
|
+
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
|
|
291
|
+
*/
|
|
292
|
+
leapDays: (y: any) => 0 | 30 | 29;
|
|
293
|
+
/**
|
|
294
|
+
* 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
|
|
295
|
+
* @param y lunar Year
|
|
296
|
+
* @param m lunar Month
|
|
297
|
+
* @return Number (-1、29、30)
|
|
298
|
+
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
|
|
299
|
+
*/
|
|
300
|
+
monthDays: (y: any, m: any) => -1 | 30 | 29;
|
|
301
|
+
/**
|
|
302
|
+
* 返回公历(!)y年m月的天数
|
|
303
|
+
* @param y solar Year
|
|
304
|
+
* @param m solar Month
|
|
305
|
+
* @return Number (-1、28、29、30、31)
|
|
306
|
+
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
|
|
307
|
+
*/
|
|
308
|
+
solarDays: (y: any, m: any) => number;
|
|
309
|
+
/**
|
|
310
|
+
* 农历年份转换为干支纪年
|
|
311
|
+
* @param lYear 农历年的年份数
|
|
312
|
+
* @return Cn string
|
|
313
|
+
*/
|
|
314
|
+
toGanZhiYear: (lYear: any) => string;
|
|
315
|
+
/**
|
|
316
|
+
* 公历月、日判断所属星座
|
|
317
|
+
* @param cMonth [description]
|
|
318
|
+
* @param cDay [description]
|
|
319
|
+
* @return Cn string
|
|
320
|
+
*/
|
|
321
|
+
toAstro: (cMonth: any, cDay: any) => string;
|
|
322
|
+
/**
|
|
323
|
+
* 传入offset偏移量返回干支
|
|
324
|
+
* @param offset 相对甲子的偏移量
|
|
325
|
+
* @return Cn string
|
|
326
|
+
*/
|
|
327
|
+
toGanZhi: (offset: any) => string;
|
|
328
|
+
/**
|
|
329
|
+
* 传入公历(!)y年获得该年第n个节气的公历日期
|
|
330
|
+
* @param y y公历年(1900-2100)
|
|
331
|
+
* @param n n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
|
|
332
|
+
* @return day Number
|
|
333
|
+
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
|
|
334
|
+
*/
|
|
335
|
+
getTerm: (y: any, n: any) => number;
|
|
336
|
+
/**
|
|
337
|
+
* 传入农历数字月份返回汉语通俗表示法
|
|
338
|
+
* @param m lunar month
|
|
339
|
+
* @return Cn string
|
|
340
|
+
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
|
|
341
|
+
*/
|
|
342
|
+
toChinaMonth: (m: any) => string | -1;
|
|
343
|
+
/**
|
|
344
|
+
* 传入农历日期数字返回汉字表示法
|
|
345
|
+
* @param d lunar day
|
|
346
|
+
* @return Cn string
|
|
347
|
+
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
|
|
348
|
+
*/
|
|
349
|
+
toChinaDay: (d: any) => any;
|
|
350
|
+
/**
|
|
351
|
+
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
|
|
352
|
+
* @param y year
|
|
353
|
+
* @return Cn string
|
|
354
|
+
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
|
|
355
|
+
*/
|
|
356
|
+
getAnimal: (y: any) => string;
|
|
357
|
+
/**
|
|
358
|
+
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
|
|
359
|
+
* !important! 公历参数区间1900.1.31~2100.12.31
|
|
360
|
+
* @param yPara solar year
|
|
361
|
+
* @param mPara solar month
|
|
362
|
+
* @param dPara solar day
|
|
363
|
+
* @return JSON object
|
|
364
|
+
* @eg:console.log(calendar.solar2lunar(1987,11,01));
|
|
365
|
+
*/
|
|
366
|
+
solar2lunar: (yPara: any, mPara: any, dPara: any) => -1 | {
|
|
367
|
+
date: string;
|
|
368
|
+
lunarDate: string;
|
|
369
|
+
festival: any;
|
|
370
|
+
lunarFestival: any;
|
|
371
|
+
lYear: any;
|
|
372
|
+
lMonth: any;
|
|
373
|
+
lDay: number;
|
|
374
|
+
Animal: string;
|
|
375
|
+
IMonthCn: string;
|
|
376
|
+
IDayCn: any;
|
|
377
|
+
cYear: number;
|
|
378
|
+
cMonth: number;
|
|
379
|
+
cDay: number;
|
|
380
|
+
gzYear: string;
|
|
381
|
+
gzMonth: string;
|
|
382
|
+
gzDay: string;
|
|
383
|
+
isToday: boolean;
|
|
384
|
+
isLeap: boolean;
|
|
385
|
+
nWeek: any;
|
|
386
|
+
ncWeek: string;
|
|
387
|
+
isTerm: boolean;
|
|
388
|
+
Term: any;
|
|
389
|
+
astro: string;
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
|
|
393
|
+
* !important! 参数区间1900.1.31~2100.12.1
|
|
394
|
+
* @param y lunar year
|
|
395
|
+
* @param m lunar month
|
|
396
|
+
* @param d lunar day
|
|
397
|
+
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
|
|
398
|
+
* @return JSON object
|
|
399
|
+
* @eg:console.log(calendar.lunar2solar(1987,9,10));
|
|
400
|
+
*/
|
|
401
|
+
lunar2solar: (y: any, m: any, d: any, isLeapMonth: any) => -1 | {
|
|
402
|
+
date: string;
|
|
403
|
+
lunarDate: string;
|
|
404
|
+
festival: any;
|
|
405
|
+
lunarFestival: any;
|
|
406
|
+
lYear: any;
|
|
407
|
+
lMonth: any;
|
|
408
|
+
lDay: number;
|
|
409
|
+
Animal: string;
|
|
410
|
+
IMonthCn: string;
|
|
411
|
+
IDayCn: any;
|
|
412
|
+
cYear: number;
|
|
413
|
+
cMonth: number;
|
|
414
|
+
cDay: number;
|
|
415
|
+
gzYear: string;
|
|
416
|
+
gzMonth: string;
|
|
417
|
+
gzDay: string;
|
|
418
|
+
isToday: boolean;
|
|
419
|
+
isLeap: boolean;
|
|
420
|
+
nWeek: any;
|
|
421
|
+
ncWeek: string;
|
|
422
|
+
isTerm: boolean;
|
|
423
|
+
Term: any;
|
|
424
|
+
astro: string;
|
|
425
|
+
};
|
|
426
|
+
};
|