@sanguogege/calendar 1.0.2 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanguogege/calendar",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "keywords": [
5
5
  "日历",
6
6
  "农历",
@@ -1,73 +0,0 @@
1
- /**
2
- * 农历1900-2100的润大小信息表
3
- * @Array Of Property
4
- * @return Hex
5
- */
6
- declare const LunarInfo: number[];
7
- /**
8
- * 公历每个月份的天数普通表
9
- * @Array Of Property
10
- * @return Number
11
- */
12
- declare const SolarMonth: number[];
13
- /**
14
- * 天干地支之天干速查表
15
- * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
16
- * @return Cn string
17
- */
18
- declare const Gan: string[];
19
- /**
20
- * 天干地支之地支速查表
21
- * @Array Of Property
22
- * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
23
- * @return Cn string
24
- */
25
- declare const Zhi: string[];
26
- /**
27
- * 每日的时辰对照表
28
- * @Array Of Property
29
- * @return Cn string
30
- */
31
- declare const GanZhiHour: string[];
32
- /**
33
- * 天干地支之地支速查表<=>生肖
34
- * @Array Of Property
35
- * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
36
- * @return Cn string
37
- */
38
- declare const Animals: string[];
39
- /**
40
- * 24节气速查表
41
- * @Array Of Property
42
- * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
43
- * @return Cn string
44
- */
45
- declare const SolarTerm: string[];
46
- /**
47
- * 1900-2100各年的24节气日期速查表
48
- * @Array Of Property
49
- * @return 0x string For splice
50
- */
51
- declare const TermInfo: string[];
52
- /**
53
- * 数字转中文速查表
54
- * @Array Of Property
55
- * @trans ['日','一','二','三','四','五','六','七','八','九','十']
56
- * @return Cn string
57
- */
58
- declare const nStr1: string[];
59
- /**
60
- * 日期转农历称呼速查表
61
- * @Array Of Property
62
- * @trans ['初','十','廿','卅']
63
- * @return Cn string
64
- */
65
- declare const nStr2: string[];
66
- /**
67
- * 月份转农历称呼速查表
68
- * @Array Of Property
69
- * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
70
- * @return Cn string
71
- */
72
- declare const nStr3: string[];
73
- export { LunarInfo, SolarMonth, Gan, Zhi, GanZhiHour, Animals, SolarTerm, TermInfo, nStr1, nStr2, nStr3, };
@@ -1,68 +0,0 @@
1
- /**
2
- * 返回农历y年一整年的总天数
3
- * @param lunar Year
4
- * @return Number
5
- * @eg:var count = calendar.lYearDays(1987) ;//count=387
6
- */
7
- declare const lYearDays: (y: number) => number;
8
- /**
9
- * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
10
- * @param lunar Year
11
- * @return Number (0-12)
12
- * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
13
- */
14
- declare const leapMonth: (y: number) => number;
15
- /**
16
- * 返回农历y年闰月的天数 若该年没有闰月则返回0
17
- * @param lunar Year
18
- * @return Number (0、29、30)
19
- * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
20
- */
21
- declare const leapDays: (y: number) => number;
22
- /**
23
- * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
24
- * @param lunar Year
25
- * @return Number (-1、29、30)
26
- * @eg:var MonthDay = calendar.lMonthDays(1987,9) ;//MonthDay=29
27
- */
28
- declare const lMonthDays: (y: number, m: number) => number;
29
- /**
30
- * 农历年份转换为干支纪年
31
- * @param lYear 农历年的年份数
32
- * @return Cn string
33
- */
34
- declare const toGanZhiYear: (lYear: number) => string;
35
- /**
36
- * 传入offset偏移量返回干支
37
- * @param offset 相对甲子的偏移量
38
- * @return Cn string
39
- */
40
- declare const toGanZhi: (offset: number) => string;
41
- /**
42
- * 传入offset偏移量返回干支
43
- * @param offset 相对甲子的偏移量
44
- * @return Cn string
45
- */
46
- declare const toHourGanZhi: (offset: number) => string[];
47
- /**
48
- * 传入农历数字月份返回汉语通俗表示法
49
- * @param lunar month
50
- * @return Cn string
51
- * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
52
- */
53
- declare const toChinaMonth: (m: number) => any;
54
- /**
55
- * 传入农历日期数字返回汉字表示法
56
- * @param lunar day
57
- * @return Cn string
58
- * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
59
- */
60
- declare const toChinaDay: (d: number) => string;
61
- /**
62
- * 获取24节气的方法
63
- * @param number
64
- * @return Cn string
65
- * @eg:
66
- */
67
- declare const getSolarTerm: (n: number) => string;
68
- export { lYearDays, leapMonth, leapDays, lMonthDays, toGanZhiYear, toGanZhi, toHourGanZhi, toChinaMonth, toChinaDay, getSolarTerm, };
@@ -1,5 +0,0 @@
1
- declare const FestivalDay: (m: number, d: number, data: any, type?: boolean) => {
2
- Festival: any;
3
- FDays: any;
4
- };
5
- export { FestivalDay };
@@ -1,6 +0,0 @@
1
- declare const RestDay: (y: number, m: number, d: number, data?: any) => {
2
- Xiu: any;
3
- Ban: any;
4
- newRest: any;
5
- };
6
- export { RestDay };
@@ -1,43 +0,0 @@
1
- /**
2
- * 返回公历(!)y年m月的天数
3
- * @param solar Year
4
- * @return Number (-1、28、29、30、31)
5
- * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30//月份参数从1至12,参数错误返回-1
6
- */
7
- declare const solarDays: (y: number, m: number) => number;
8
- /**
9
- * 返回公历(!)y年m月的第一天是星期几
10
- * @param solar Year
11
- * @return Number (-1、28、29、30、31)
12
- * @eg:var solarFirstWeek = calendar.solarFirstWeek(1987,1) ;//星期四
13
- */
14
- declare const solarFirstWeek: (y: number, m: number) => number;
15
- /**
16
- * 公历月、日判断所属星座
17
- * @param m [公历月]
18
- * @param d [公历日]
19
- * @return Cn string
20
- */
21
- declare const toAstro: (m: number, d: number) => string;
22
- /**
23
- * 传入公历(!)y年获得该年第n个节气的公历日期
24
- * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
25
- * @return day Number
26
- * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
27
- */
28
- declare const getTerm: (y: number, n: number) => number;
29
- /**
30
- * 年份转生肖[!仅能大致转换] 精确划分生肖分界线是“立春”
31
- * @param y year
32
- * @return Cn string
33
- * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
34
- */
35
- declare const getAnimal: (y: number) => string;
36
- /**
37
- * 数字转中文
38
- * @param number
39
- * @return Cn string
40
- * @eg:var sr = calendar.getAnimal(1987) ;//animal='兔'
41
- */
42
- declare const toChinaNum: (num: number) => string;
43
- export { solarDays, toChinaNum, solarFirstWeek, toAstro, getTerm, getAnimal };
File without changes