@kengic/uni 0.5.1 → 0.5.2-beta.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.
Files changed (146) hide show
  1. package/dist/uni/uni-ui/uni-badge/uni-badge.vue +222 -219
  2. package/dist/uni/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +29 -29
  3. package/dist/uni/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +88 -88
  4. package/dist/uni/uni-ui/uni-calendar/calendar.js +936 -532
  5. package/dist/uni/uni-ui/uni-calendar/i18n/en.json +10 -10
  6. package/dist/uni/uni-ui/uni-calendar/i18n/index.js +8 -7
  7. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hans.json +10 -10
  8. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hant.json +10 -10
  9. package/dist/uni/uni-ui/uni-calendar/uni-calendar-item.vue +190 -168
  10. package/dist/uni/uni-ui/uni-calendar/uni-calendar.vue +459 -459
  11. package/dist/uni/uni-ui/uni-calendar/util.js +324 -340
  12. package/dist/uni/uni-ui/uni-card/uni-card.vue +8 -1
  13. package/dist/uni/uni-ui/uni-col/uni-col.vue +294 -287
  14. package/dist/uni/uni-ui/uni-collapse/uni-collapse.vue +139 -140
  15. package/dist/uni/uni-ui/uni-collapse-item/uni-collapse-item.vue +381 -378
  16. package/dist/uni/uni-ui/uni-combox/uni-combox.vue +280 -272
  17. package/dist/uni/uni-ui/uni-countdown/i18n/en.json +4 -4
  18. package/dist/uni/uni-ui/uni-countdown/i18n/index.js +8 -7
  19. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hans.json +4 -4
  20. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hant.json +4 -4
  21. package/dist/uni/uni-ui/uni-countdown/uni-countdown.vue +249 -257
  22. package/dist/uni/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +832 -813
  23. package/dist/uni/uni-ui/uni-data-picker/keypress.js +42 -42
  24. package/dist/uni/uni-ui/uni-data-picker/uni-data-picker.vue +535 -516
  25. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-picker.js +623 -618
  26. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +293 -288
  27. package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +495 -509
  28. package/dist/uni/uni-ui/uni-dateformat/date-format.js +181 -184
  29. package/dist/uni/uni-ui/uni-dateformat/uni-dateformat.vue +81 -82
  30. package/dist/uni/uni-ui/uni-datetime-picker/calendar-item.vue +176 -170
  31. package/dist/uni/uni-ui/uni-datetime-picker/calendar.vue +926 -920
  32. package/dist/uni/uni-ui/uni-datetime-picker/i18n/en.json +20 -20
  33. package/dist/uni/uni-ui/uni-datetime-picker/i18n/index.js +8 -7
  34. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +21 -21
  35. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +21 -21
  36. package/dist/uni/uni-ui/uni-datetime-picker/time-picker.vue +921 -926
  37. package/dist/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1059 -1012
  38. package/dist/uni/uni-ui/uni-datetime-picker/util.js +366 -377
  39. package/dist/uni/uni-ui/uni-drawer/keypress.js +42 -42
  40. package/dist/uni/uni-ui/uni-drawer/uni-drawer.vue +176 -167
  41. package/dist/uni/uni-ui/uni-easyinput/common.js +40 -42
  42. package/dist/uni/uni-ui/uni-easyinput/uni-easyinput.vue +628 -547
  43. package/dist/uni/uni-ui/uni-fab/uni-fab.vue +507 -483
  44. package/dist/uni/uni-ui/uni-fav/i18n/en.json +2 -2
  45. package/dist/uni/uni-ui/uni-fav/i18n/index.js +8 -7
  46. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hans.json +2 -2
  47. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hant.json +2 -2
  48. package/dist/uni/uni-ui/uni-fav/uni-fav.vue +155 -147
  49. package/dist/uni/uni-ui/uni-file-picker/choose-and-upload-file.js +172 -198
  50. package/dist/uni/uni-ui/uni-file-picker/uni-file-picker.vue +636 -634
  51. package/dist/uni/uni-ui/uni-file-picker/upload-file.vue +294 -293
  52. package/dist/uni/uni-ui/uni-file-picker/upload-image.vue +267 -270
  53. package/dist/uni/uni-ui/uni-file-picker/utils.js +81 -82
  54. package/dist/uni/uni-ui/uni-forms/uni-forms.vue +360 -372
  55. package/dist/uni/uni-ui/uni-forms/utils.js +170 -174
  56. package/dist/uni/uni-ui/uni-forms/validate.js +447 -456
  57. package/dist/uni/uni-ui/uni-forms-item/uni-forms-item.vue +497 -497
  58. package/dist/uni/uni-ui/uni-goods-nav/i18n/en.json +4 -4
  59. package/dist/uni/uni-ui/uni-goods-nav/i18n/index.js +8 -7
  60. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hans.json +4 -4
  61. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hant.json +4 -4
  62. package/dist/uni/uni-ui/uni-goods-nav/uni-goods-nav.vue +238 -222
  63. package/dist/uni/uni-ui/uni-grid/uni-grid.vue +134 -134
  64. package/dist/uni/uni-ui/uni-grid-item/uni-grid-item.vue +121 -119
  65. package/dist/uni/uni-ui/uni-group/uni-group.vue +121 -121
  66. package/dist/uni/uni-ui/uni-icons/icons.js +1170 -1168
  67. package/dist/uni/uni-ui/uni-icons/uni-icons.vue +91 -86
  68. package/dist/uni/uni-ui/uni-icons/uniicons.css +166 -166
  69. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +129 -129
  70. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list.vue +352 -347
  71. package/dist/uni/uni-ui/uni-link/uni-link.vue +134 -119
  72. package/dist/uni/uni-ui/uni-list/uni-list.vue +119 -110
  73. package/dist/uni/uni-ui/uni-list/uni-refresh.vue +14 -14
  74. package/dist/uni/uni-ui/uni-list/uni-refresh.wxs +14 -14
  75. package/dist/uni/uni-ui/uni-list-ad/uni-list-ad.vue +101 -95
  76. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.scss +18 -18
  77. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.vue +602 -586
  78. package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
  79. package/dist/uni/uni-ui/uni-load-more/i18n/en.json +3 -3
  80. package/dist/uni/uni-ui/uni-load-more/i18n/index.js +8 -7
  81. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hans.json +3 -3
  82. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hant.json +3 -3
  83. package/dist/uni/uni-ui/uni-load-more/uni-load-more.vue +402 -392
  84. package/dist/uni/uni-ui/uni-nav-bar/uni-nav-bar.vue +328 -330
  85. package/dist/uni/uni-ui/uni-nav-bar/uni-status-bar.vue +17 -17
  86. package/dist/uni/uni-ui/uni-notice-bar/uni-notice-bar.vue +422 -401
  87. package/dist/uni/uni-ui/uni-number-box/uni-number-box.vue +211 -205
  88. package/dist/uni/uni-ui/uni-pagination/i18n/en.json +3 -3
  89. package/dist/uni/uni-ui/uni-pagination/i18n/es.json +3 -3
  90. package/dist/uni/uni-ui/uni-pagination/i18n/fr.json +3 -3
  91. package/dist/uni/uni-ui/uni-pagination/i18n/index.js +12 -11
  92. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hans.json +3 -3
  93. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hant.json +3 -3
  94. package/dist/uni/uni-ui/uni-pagination/uni-pagination.vue +450 -433
  95. package/dist/uni/uni-ui/uni-popup/uni-popup.vue +404 -404
  96. package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
  97. package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +1 -0
  98. package/dist/uni/uni-ui/uni-popup-message/uni-popup-message.vue +126 -125
  99. package/dist/uni/uni-ui/uni-popup-share/uni-popup-share.vue +172 -172
  100. package/dist/uni/uni-ui/uni-rate/uni-rate.vue +343 -347
  101. package/dist/uni/uni-ui/uni-row/uni-row.vue +180 -182
  102. package/dist/uni/uni-ui/uni-scss/changelog.md +11 -4
  103. package/dist/uni/uni-ui/uni-scss/package.json +73 -73
  104. package/dist/uni/uni-ui/uni-scss/readme.md +2 -1
  105. package/dist/uni/uni-ui/uni-scss/styles/setting/_border.scss +2 -2
  106. package/dist/uni/uni-ui/uni-scss/styles/setting/_color.scss +46 -47
  107. package/dist/uni/uni-ui/uni-scss/styles/setting/_radius.scss +49 -49
  108. package/dist/uni/uni-ui/uni-scss/styles/setting/_space.scss +52 -53
  109. package/dist/uni/uni-ui/uni-scss/styles/setting/_styles.scss +142 -147
  110. package/dist/uni/uni-ui/uni-scss/styles/setting/_text.scss +20 -20
  111. package/dist/uni/uni-ui/uni-scss/styles/setting/_variables.scss +111 -95
  112. package/dist/uni/uni-ui/uni-scss/styles/tools/functions.scss +28 -18
  113. package/dist/uni/uni-ui/uni-scss/theme.scss +10 -7
  114. package/dist/uni/uni-ui/uni-scss/variables.scss +42 -24
  115. package/dist/uni/uni-ui/uni-search-bar/i18n/en.json +3 -3
  116. package/dist/uni/uni-ui/uni-search-bar/i18n/index.js +8 -7
  117. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hans.json +2 -2
  118. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hant.json +2 -2
  119. package/dist/uni/uni-ui/uni-search-bar/uni-search-bar.vue +290 -281
  120. package/dist/uni/uni-ui/uni-section/uni-section.vue +149 -146
  121. package/dist/uni/uni-ui/uni-segmented-control/uni-segmented-control.vue +141 -131
  122. package/dist/uni/uni-ui/uni-steps/uni-steps.vue +255 -236
  123. package/dist/uni/uni-ui/uni-swipe-action/uni-swipe-action.vue +51 -51
  124. package/dist/uni/uni-ui/uni-swipe-action-item/bindingx.js +276 -282
  125. package/dist/uni/uni-ui/uni-swipe-action-item/isPC.js +10 -10
  126. package/dist/uni/uni-ui/uni-swipe-action-item/mpalipay.js +182 -187
  127. package/dist/uni/uni-ui/uni-swipe-action-item/mpother.js +235 -244
  128. package/dist/uni/uni-ui/uni-swipe-action-item/mpwxs.js +70 -75
  129. package/dist/uni/uni-ui/uni-swipe-action-item/render.js +238 -247
  130. package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +392 -313
  131. package/dist/uni/uni-ui/uni-swipe-action-item/wx.wxs +206 -215
  132. package/dist/uni/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +241 -197
  133. package/dist/uni/uni-ui/uni-table/uni-table.vue +445 -447
  134. package/dist/uni/uni-ui/uni-tag/uni-tag.vue +234 -244
  135. package/dist/uni/uni-ui/uni-tbody/uni-tbody.vue +20 -23
  136. package/dist/uni/uni-ui/uni-td/uni-td.vue +79 -80
  137. package/dist/uni/uni-ui/uni-th/filter-dropdown.vue +510 -503
  138. package/dist/uni/uni-ui/uni-th/uni-th.vue +289 -273
  139. package/dist/uni/uni-ui/uni-thead/uni-thead.vue +115 -114
  140. package/dist/uni/uni-ui/uni-title/uni-title.vue +151 -154
  141. package/dist/uni/uni-ui/uni-tooltip/uni-tooltip.vue +55 -60
  142. package/dist/uni/uni-ui/uni-tr/table-checkbox.vue +162 -163
  143. package/dist/uni/uni-ui/uni-tr/uni-tr.vue +158 -157
  144. package/dist/uni/uni-ui/uni-transition/createAnimation.js +130 -113
  145. package/dist/uni/uni-ui/uni-transition/uni-transition.vue +274 -272
  146. package/package.json +1 -1
@@ -1,546 +1,950 @@
1
1
  /**
2
- * @1900-2100区间内的公历、农历互转
3
- * @charset UTF-8
4
- * @github https://github.com/jjonline/calendar.js
5
- * @Author Jea杨(JJonline@JJonline.Cn)
6
- * @Time 2014-7-21
7
- * @Time 2016-8-13 Fixed 2033hex、Attribution Annals
8
- * @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
9
- * @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
10
- * @Version 1.0.3
11
- * @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
12
- * @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
13
- */
2
+ * @1900-2100区间内的公历、农历互转
3
+ * @charset UTF-8
4
+ * @github https://github.com/jjonline/calendar.js
5
+ * @Author Jea杨(JJonline@JJonline.Cn)
6
+ * @Time 2014-7-21
7
+ * @Time 2016-8-13 Fixed 2033hex、Attribution Annals
8
+ * @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
9
+ * @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
10
+ * @Version 1.0.3
11
+ * @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
12
+ * @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
13
+ */
14
14
  /* eslint-disable */
15
15
  var calendar = {
16
+ /**
17
+ * 农历1900-2100的润大小信息表
18
+ * @Array Of Property
19
+ * @return Hex
20
+ */
21
+ lunarInfo: [
22
+ 0x04bd8,
23
+ 0x04ae0,
24
+ 0x0a570,
25
+ 0x054d5,
26
+ 0x0d260,
27
+ 0x0d950,
28
+ 0x16554,
29
+ 0x056a0,
30
+ 0x09ad0,
31
+ 0x055d2, // 1900-1909
32
+ 0x04ae0,
33
+ 0x0a5b6,
34
+ 0x0a4d0,
35
+ 0x0d250,
36
+ 0x1d255,
37
+ 0x0b540,
38
+ 0x0d6a0,
39
+ 0x0ada2,
40
+ 0x095b0,
41
+ 0x14977, // 1910-1919
42
+ 0x04970,
43
+ 0x0a4b0,
44
+ 0x0b4b5,
45
+ 0x06a50,
46
+ 0x06d40,
47
+ 0x1ab54,
48
+ 0x02b60,
49
+ 0x09570,
50
+ 0x052f2,
51
+ 0x04970, // 1920-1929
52
+ 0x06566,
53
+ 0x0d4a0,
54
+ 0x0ea50,
55
+ 0x06e95,
56
+ 0x05ad0,
57
+ 0x02b60,
58
+ 0x186e3,
59
+ 0x092e0,
60
+ 0x1c8d7,
61
+ 0x0c950, // 1930-1939
62
+ 0x0d4a0,
63
+ 0x1d8a6,
64
+ 0x0b550,
65
+ 0x056a0,
66
+ 0x1a5b4,
67
+ 0x025d0,
68
+ 0x092d0,
69
+ 0x0d2b2,
70
+ 0x0a950,
71
+ 0x0b557, // 1940-1949
72
+ 0x06ca0,
73
+ 0x0b550,
74
+ 0x15355,
75
+ 0x04da0,
76
+ 0x0a5b0,
77
+ 0x14573,
78
+ 0x052b0,
79
+ 0x0a9a8,
80
+ 0x0e950,
81
+ 0x06aa0, // 1950-1959
82
+ 0x0aea6,
83
+ 0x0ab50,
84
+ 0x04b60,
85
+ 0x0aae4,
86
+ 0x0a570,
87
+ 0x05260,
88
+ 0x0f263,
89
+ 0x0d950,
90
+ 0x05b57,
91
+ 0x056a0, // 1960-1969
92
+ 0x096d0,
93
+ 0x04dd5,
94
+ 0x04ad0,
95
+ 0x0a4d0,
96
+ 0x0d4d4,
97
+ 0x0d250,
98
+ 0x0d558,
99
+ 0x0b540,
100
+ 0x0b6a0,
101
+ 0x195a6, // 1970-1979
102
+ 0x095b0,
103
+ 0x049b0,
104
+ 0x0a974,
105
+ 0x0a4b0,
106
+ 0x0b27a,
107
+ 0x06a50,
108
+ 0x06d40,
109
+ 0x0af46,
110
+ 0x0ab60,
111
+ 0x09570, // 1980-1989
112
+ 0x04af5,
113
+ 0x04970,
114
+ 0x064b0,
115
+ 0x074a3,
116
+ 0x0ea50,
117
+ 0x06b58,
118
+ 0x05ac0,
119
+ 0x0ab60,
120
+ 0x096d5,
121
+ 0x092e0, // 1990-1999
122
+ 0x0c960,
123
+ 0x0d954,
124
+ 0x0d4a0,
125
+ 0x0da50,
126
+ 0x07552,
127
+ 0x056a0,
128
+ 0x0abb7,
129
+ 0x025d0,
130
+ 0x092d0,
131
+ 0x0cab5, // 2000-2009
132
+ 0x0a950,
133
+ 0x0b4a0,
134
+ 0x0baa4,
135
+ 0x0ad50,
136
+ 0x055d9,
137
+ 0x04ba0,
138
+ 0x0a5b0,
139
+ 0x15176,
140
+ 0x052b0,
141
+ 0x0a930, // 2010-2019
142
+ 0x07954,
143
+ 0x06aa0,
144
+ 0x0ad50,
145
+ 0x05b52,
146
+ 0x04b60,
147
+ 0x0a6e6,
148
+ 0x0a4e0,
149
+ 0x0d260,
150
+ 0x0ea65,
151
+ 0x0d530, // 2020-2029
152
+ 0x05aa0,
153
+ 0x076a3,
154
+ 0x096d0,
155
+ 0x04afb,
156
+ 0x04ad0,
157
+ 0x0a4d0,
158
+ 0x1d0b6,
159
+ 0x0d250,
160
+ 0x0d520,
161
+ 0x0dd45, // 2030-2039
162
+ 0x0b5a0,
163
+ 0x056d0,
164
+ 0x055b2,
165
+ 0x049b0,
166
+ 0x0a577,
167
+ 0x0a4b0,
168
+ 0x0aa50,
169
+ 0x1b255,
170
+ 0x06d20,
171
+ 0x0ada0, // 2040-2049
172
+ /** Add By JJonline@JJonline.Cn**/
173
+ 0x14b63,
174
+ 0x09370,
175
+ 0x049f8,
176
+ 0x04970,
177
+ 0x064b0,
178
+ 0x168a6,
179
+ 0x0ea50,
180
+ 0x06b20,
181
+ 0x1a6c4,
182
+ 0x0aae0, // 2050-2059
183
+ 0x0a2e0,
184
+ 0x0d2e3,
185
+ 0x0c960,
186
+ 0x0d557,
187
+ 0x0d4a0,
188
+ 0x0da50,
189
+ 0x05d55,
190
+ 0x056a0,
191
+ 0x0a6d0,
192
+ 0x055d4, // 2060-2069
193
+ 0x052d0,
194
+ 0x0a9b8,
195
+ 0x0a950,
196
+ 0x0b4a0,
197
+ 0x0b6a6,
198
+ 0x0ad50,
199
+ 0x055a0,
200
+ 0x0aba4,
201
+ 0x0a5b0,
202
+ 0x052b0, // 2070-2079
203
+ 0x0b273,
204
+ 0x06930,
205
+ 0x07337,
206
+ 0x06aa0,
207
+ 0x0ad50,
208
+ 0x14b55,
209
+ 0x04b60,
210
+ 0x0a570,
211
+ 0x054e4,
212
+ 0x0d160, // 2080-2089
213
+ 0x0e968,
214
+ 0x0d520,
215
+ 0x0daa0,
216
+ 0x16aa6,
217
+ 0x056d0,
218
+ 0x04ae0,
219
+ 0x0a9d4,
220
+ 0x0a2d0,
221
+ 0x0d150,
222
+ 0x0f252, // 2090-2099
223
+ 0x0d520,
224
+ ], // 2100
225
+
226
+ /**
227
+ * 公历每个月份的天数普通表
228
+ * @Array Of Property
229
+ * @return Number
230
+ */
231
+ solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
232
+
233
+ /**
234
+ * 天干地支之天干速查表
235
+ * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
236
+ * @return Cn string
237
+ */
238
+ Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
239
+
240
+ /**
241
+ * 天干地支之地支速查表
242
+ * @Array Of Property
243
+ * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
244
+ * @return Cn string
245
+ */
246
+ Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'],
247
+
248
+ /**
249
+ * 天干地支之地支速查表<=>生肖
250
+ * @Array Of Property
251
+ * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
252
+ * @return Cn string
253
+ */
254
+ Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'],
255
+
256
+ /**
257
+ * 24节气速查表
258
+ * @Array Of Property
259
+ * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
260
+ * @return Cn string
261
+ */
262
+ solarTerm: [
263
+ '\u5c0f\u5bd2',
264
+ '\u5927\u5bd2',
265
+ '\u7acb\u6625',
266
+ '\u96e8\u6c34',
267
+ '\u60ca\u86f0',
268
+ '\u6625\u5206',
269
+ '\u6e05\u660e',
270
+ '\u8c37\u96e8',
271
+ '\u7acb\u590f',
272
+ '\u5c0f\u6ee1',
273
+ '\u8292\u79cd',
274
+ '\u590f\u81f3',
275
+ '\u5c0f\u6691',
276
+ '\u5927\u6691',
277
+ '\u7acb\u79cb',
278
+ '\u5904\u6691',
279
+ '\u767d\u9732',
280
+ '\u79cb\u5206',
281
+ '\u5bd2\u9732',
282
+ '\u971c\u964d',
283
+ '\u7acb\u51ac',
284
+ '\u5c0f\u96ea',
285
+ '\u5927\u96ea',
286
+ '\u51ac\u81f3',
287
+ ],
288
+
289
+ /**
290
+ * 1900-2100各年的24节气日期速查表
291
+ * @Array Of Property
292
+ * @return 0x string For splice
293
+ */
294
+ sTermInfo: [
295
+ '9778397bd097c36b0b6fc9274c91aa',
296
+ '97b6b97bd19801ec9210c965cc920e',
297
+ '97bcf97c3598082c95f8c965cc920f',
298
+ '97bd0b06bdb0722c965ce1cfcc920f',
299
+ 'b027097bd097c36b0b6fc9274c91aa',
300
+ '97b6b97bd19801ec9210c965cc920e',
301
+ '97bcf97c359801ec95f8c965cc920f',
302
+ '97bd0b06bdb0722c965ce1cfcc920f',
303
+ 'b027097bd097c36b0b6fc9274c91aa',
304
+ '97b6b97bd19801ec9210c965cc920e',
305
+ '97bcf97c359801ec95f8c965cc920f',
306
+ '97bd0b06bdb0722c965ce1cfcc920f',
307
+ 'b027097bd097c36b0b6fc9274c91aa',
308
+ '9778397bd19801ec9210c965cc920e',
309
+ '97b6b97bd19801ec95f8c965cc920f',
310
+ '97bd09801d98082c95f8e1cfcc920f',
311
+ '97bd097bd097c36b0b6fc9210c8dc2',
312
+ '9778397bd197c36c9210c9274c91aa',
313
+ '97b6b97bd19801ec95f8c965cc920e',
314
+ '97bd09801d98082c95f8e1cfcc920f',
315
+ '97bd097bd097c36b0b6fc9210c8dc2',
316
+ '9778397bd097c36c9210c9274c91aa',
317
+ '97b6b97bd19801ec95f8c965cc920e',
318
+ '97bcf97c3598082c95f8e1cfcc920f',
319
+ '97bd097bd097c36b0b6fc9210c8dc2',
320
+ '9778397bd097c36c9210c9274c91aa',
321
+ '97b6b97bd19801ec9210c965cc920e',
322
+ '97bcf97c3598082c95f8c965cc920f',
323
+ '97bd097bd097c35b0b6fc920fb0722',
324
+ '9778397bd097c36b0b6fc9274c91aa',
325
+ '97b6b97bd19801ec9210c965cc920e',
326
+ '97bcf97c3598082c95f8c965cc920f',
327
+ '97bd097bd097c35b0b6fc920fb0722',
328
+ '9778397bd097c36b0b6fc9274c91aa',
329
+ '97b6b97bd19801ec9210c965cc920e',
330
+ '97bcf97c359801ec95f8c965cc920f',
331
+ '97bd097bd097c35b0b6fc920fb0722',
332
+ '9778397bd097c36b0b6fc9274c91aa',
333
+ '97b6b97bd19801ec9210c965cc920e',
334
+ '97bcf97c359801ec95f8c965cc920f',
335
+ '97bd097bd097c35b0b6fc920fb0722',
336
+ '9778397bd097c36b0b6fc9274c91aa',
337
+ '97b6b97bd19801ec9210c965cc920e',
338
+ '97bcf97c359801ec95f8c965cc920f',
339
+ '97bd097bd07f595b0b6fc920fb0722',
340
+ '9778397bd097c36b0b6fc9210c8dc2',
341
+ '9778397bd19801ec9210c9274c920e',
342
+ '97b6b97bd19801ec95f8c965cc920f',
343
+ '97bd07f5307f595b0b0bc920fb0722',
344
+ '7f0e397bd097c36b0b6fc9210c8dc2',
345
+ '9778397bd097c36c9210c9274c920e',
346
+ '97b6b97bd19801ec95f8c965cc920f',
347
+ '97bd07f5307f595b0b0bc920fb0722',
348
+ '7f0e397bd097c36b0b6fc9210c8dc2',
349
+ '9778397bd097c36c9210c9274c91aa',
350
+ '97b6b97bd19801ec9210c965cc920e',
351
+ '97bd07f1487f595b0b0bc920fb0722',
352
+ '7f0e397bd097c36b0b6fc9210c8dc2',
353
+ '9778397bd097c36b0b6fc9274c91aa',
354
+ '97b6b97bd19801ec9210c965cc920e',
355
+ '97bcf7f1487f595b0b0bb0b6fb0722',
356
+ '7f0e397bd097c35b0b6fc920fb0722',
357
+ '9778397bd097c36b0b6fc9274c91aa',
358
+ '97b6b97bd19801ec9210c965cc920e',
359
+ '97bcf7f1487f595b0b0bb0b6fb0722',
360
+ '7f0e397bd097c35b0b6fc920fb0722',
361
+ '9778397bd097c36b0b6fc9274c91aa',
362
+ '97b6b97bd19801ec9210c965cc920e',
363
+ '97bcf7f1487f531b0b0bb0b6fb0722',
364
+ '7f0e397bd097c35b0b6fc920fb0722',
365
+ '9778397bd097c36b0b6fc9274c91aa',
366
+ '97b6b97bd19801ec9210c965cc920e',
367
+ '97bcf7f1487f531b0b0bb0b6fb0722',
368
+ '7f0e397bd07f595b0b6fc920fb0722',
369
+ '9778397bd097c36b0b6fc9274c91aa',
370
+ '97b6b97bd19801ec9210c9274c920e',
371
+ '97bcf7f0e47f531b0b0bb0b6fb0722',
372
+ '7f0e397bd07f595b0b0bc920fb0722',
373
+ '9778397bd097c36b0b6fc9210c91aa',
374
+ '97b6b97bd197c36c9210c9274c920e',
375
+ '97bcf7f0e47f531b0b0bb0b6fb0722',
376
+ '7f0e397bd07f595b0b0bc920fb0722',
377
+ '9778397bd097c36b0b6fc9210c8dc2',
378
+ '9778397bd097c36c9210c9274c920e',
379
+ '97b6b7f0e47f531b0723b0b6fb0722',
380
+ '7f0e37f5307f595b0b0bc920fb0722',
381
+ '7f0e397bd097c36b0b6fc9210c8dc2',
382
+ '9778397bd097c36b0b70c9274c91aa',
383
+ '97b6b7f0e47f531b0723b0b6fb0721',
384
+ '7f0e37f1487f595b0b0bb0b6fb0722',
385
+ '7f0e397bd097c35b0b6fc9210c8dc2',
386
+ '9778397bd097c36b0b6fc9274c91aa',
387
+ '97b6b7f0e47f531b0723b0b6fb0721',
388
+ '7f0e27f1487f595b0b0bb0b6fb0722',
389
+ '7f0e397bd097c35b0b6fc920fb0722',
390
+ '9778397bd097c36b0b6fc9274c91aa',
391
+ '97b6b7f0e47f531b0723b0b6fb0721',
392
+ '7f0e27f1487f531b0b0bb0b6fb0722',
393
+ '7f0e397bd097c35b0b6fc920fb0722',
394
+ '9778397bd097c36b0b6fc9274c91aa',
395
+ '97b6b7f0e47f531b0723b0b6fb0721',
396
+ '7f0e27f1487f531b0b0bb0b6fb0722',
397
+ '7f0e397bd097c35b0b6fc920fb0722',
398
+ '9778397bd097c36b0b6fc9274c91aa',
399
+ '97b6b7f0e47f531b0723b0b6fb0721',
400
+ '7f0e27f1487f531b0b0bb0b6fb0722',
401
+ '7f0e397bd07f595b0b0bc920fb0722',
402
+ '9778397bd097c36b0b6fc9274c91aa',
403
+ '97b6b7f0e47f531b0723b0787b0721',
404
+ '7f0e27f0e47f531b0b0bb0b6fb0722',
405
+ '7f0e397bd07f595b0b0bc920fb0722',
406
+ '9778397bd097c36b0b6fc9210c91aa',
407
+ '97b6b7f0e47f149b0723b0787b0721',
408
+ '7f0e27f0e47f531b0723b0b6fb0722',
409
+ '7f0e397bd07f595b0b0bc920fb0722',
410
+ '9778397bd097c36b0b6fc9210c8dc2',
411
+ '977837f0e37f149b0723b0787b0721',
412
+ '7f07e7f0e47f531b0723b0b6fb0722',
413
+ '7f0e37f5307f595b0b0bc920fb0722',
414
+ '7f0e397bd097c35b0b6fc9210c8dc2',
415
+ '977837f0e37f14998082b0787b0721',
416
+ '7f07e7f0e47f531b0723b0b6fb0721',
417
+ '7f0e37f1487f595b0b0bb0b6fb0722',
418
+ '7f0e397bd097c35b0b6fc9210c8dc2',
419
+ '977837f0e37f14998082b0787b06bd',
420
+ '7f07e7f0e47f531b0723b0b6fb0721',
421
+ '7f0e27f1487f531b0b0bb0b6fb0722',
422
+ '7f0e397bd097c35b0b6fc920fb0722',
423
+ '977837f0e37f14998082b0787b06bd',
424
+ '7f07e7f0e47f531b0723b0b6fb0721',
425
+ '7f0e27f1487f531b0b0bb0b6fb0722',
426
+ '7f0e397bd097c35b0b6fc920fb0722',
427
+ '977837f0e37f14998082b0787b06bd',
428
+ '7f07e7f0e47f531b0723b0b6fb0721',
429
+ '7f0e27f1487f531b0b0bb0b6fb0722',
430
+ '7f0e397bd07f595b0b0bc920fb0722',
431
+ '977837f0e37f14998082b0787b06bd',
432
+ '7f07e7f0e47f531b0723b0b6fb0721',
433
+ '7f0e27f1487f531b0b0bb0b6fb0722',
434
+ '7f0e397bd07f595b0b0bc920fb0722',
435
+ '977837f0e37f14998082b0787b06bd',
436
+ '7f07e7f0e47f149b0723b0787b0721',
437
+ '7f0e27f0e47f531b0b0bb0b6fb0722',
438
+ '7f0e397bd07f595b0b0bc920fb0722',
439
+ '977837f0e37f14998082b0723b06bd',
440
+ '7f07e7f0e37f149b0723b0787b0721',
441
+ '7f0e27f0e47f531b0723b0b6fb0722',
442
+ '7f0e397bd07f595b0b0bc920fb0722',
443
+ '977837f0e37f14898082b0723b02d5',
444
+ '7ec967f0e37f14998082b0787b0721',
445
+ '7f07e7f0e47f531b0723b0b6fb0722',
446
+ '7f0e37f1487f595b0b0bb0b6fb0722',
447
+ '7f0e37f0e37f14898082b0723b02d5',
448
+ '7ec967f0e37f14998082b0787b0721',
449
+ '7f07e7f0e47f531b0723b0b6fb0722',
450
+ '7f0e37f1487f531b0b0bb0b6fb0722',
451
+ '7f0e37f0e37f14898082b0723b02d5',
452
+ '7ec967f0e37f14998082b0787b06bd',
453
+ '7f07e7f0e47f531b0723b0b6fb0721',
454
+ '7f0e37f1487f531b0b0bb0b6fb0722',
455
+ '7f0e37f0e37f14898082b072297c35',
456
+ '7ec967f0e37f14998082b0787b06bd',
457
+ '7f07e7f0e47f531b0723b0b6fb0721',
458
+ '7f0e27f1487f531b0b0bb0b6fb0722',
459
+ '7f0e37f0e37f14898082b072297c35',
460
+ '7ec967f0e37f14998082b0787b06bd',
461
+ '7f07e7f0e47f531b0723b0b6fb0721',
462
+ '7f0e27f1487f531b0b0bb0b6fb0722',
463
+ '7f0e37f0e366aa89801eb072297c35',
464
+ '7ec967f0e37f14998082b0787b06bd',
465
+ '7f07e7f0e47f149b0723b0787b0721',
466
+ '7f0e27f1487f531b0b0bb0b6fb0722',
467
+ '7f0e37f0e366aa89801eb072297c35',
468
+ '7ec967f0e37f14998082b0723b06bd',
469
+ '7f07e7f0e47f149b0723b0787b0721',
470
+ '7f0e27f0e47f531b0723b0b6fb0722',
471
+ '7f0e37f0e366aa89801eb072297c35',
472
+ '7ec967f0e37f14998082b0723b06bd',
473
+ '7f07e7f0e37f14998083b0787b0721',
474
+ '7f0e27f0e47f531b0723b0b6fb0722',
475
+ '7f0e37f0e366aa89801eb072297c35',
476
+ '7ec967f0e37f14898082b0723b02d5',
477
+ '7f07e7f0e37f14998082b0787b0721',
478
+ '7f07e7f0e47f531b0723b0b6fb0722',
479
+ '7f0e36665b66aa89801e9808297c35',
480
+ '665f67f0e37f14898082b0723b02d5',
481
+ '7ec967f0e37f14998082b0787b0721',
482
+ '7f07e7f0e47f531b0723b0b6fb0722',
483
+ '7f0e36665b66a449801e9808297c35',
484
+ '665f67f0e37f14898082b0723b02d5',
485
+ '7ec967f0e37f14998082b0787b06bd',
486
+ '7f07e7f0e47f531b0723b0b6fb0721',
487
+ '7f0e36665b66a449801e9808297c35',
488
+ '665f67f0e37f14898082b072297c35',
489
+ '7ec967f0e37f14998082b0787b06bd',
490
+ '7f07e7f0e47f531b0723b0b6fb0721',
491
+ '7f0e26665b66a449801e9808297c35',
492
+ '665f67f0e37f1489801eb072297c35',
493
+ '7ec967f0e37f14998082b0787b06bd',
494
+ '7f07e7f0e47f531b0723b0b6fb0721',
495
+ '7f0e27f1487f531b0b0bb0b6fb0722',
496
+ ],
497
+
498
+ /**
499
+ * 数字转中文速查表
500
+ * @Array Of Property
501
+ * @trans ['日','一','二','三','四','五','六','七','八','九','十']
502
+ * @return Cn string
503
+ */
504
+ nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'],
16
505
 
17
- /**
18
- * 农历1900-2100的润大小信息表
19
- * @Array Of Property
20
- * @return Hex
21
- */
22
- lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909
23
- 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
24
- 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
25
- 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
26
- 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
27
- 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
28
- 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
29
- 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
30
- 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
31
- 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
32
- 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
33
- 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
34
- 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
35
- 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
36
- 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
37
- /** Add By JJonline@JJonline.Cn**/
38
- 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
39
- 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
40
- 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
41
- 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
42
- 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
43
- 0x0d520], // 2100
44
-
45
- /**
46
- * 公历每个月份的天数普通表
47
- * @Array Of Property
48
- * @return Number
49
- */
50
- solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
51
-
52
- /**
53
- * 天干地支之天干速查表
54
- * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
55
- * @return Cn string
56
- */
57
- Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
58
-
59
- /**
60
- * 天干地支之地支速查表
61
- * @Array Of Property
62
- * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
63
- * @return Cn string
64
- */
65
- Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'],
66
-
67
- /**
68
- * 天干地支之地支速查表<=>生肖
69
- * @Array Of Property
70
- * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
71
- * @return Cn string
72
- */
73
- Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'],
74
-
75
- /**
76
- * 24节气速查表
77
- * @Array Of Property
78
- * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
79
- * @return Cn string
80
- */
81
- solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206', '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3', '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'],
82
-
83
- /**
84
- * 1900-2100各年的24节气日期速查表
85
- * @Array Of Property
86
- * @return 0x string For splice
87
- */
88
- sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f',
89
- '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
90
- '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
91
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
92
- 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
93
- '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
94
- '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
95
- '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
96
- '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
97
- '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
98
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
99
- '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
100
- '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
101
- '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
102
- '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
103
- '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
104
- '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
105
- '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
106
- '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
107
- '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
108
- '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
109
- '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
110
- '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
111
- '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
112
- '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
113
- '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
114
- '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
115
- '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
116
- '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
117
- '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
118
- '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
119
- '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
120
- '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
121
- '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
122
- '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
123
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
124
- '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
125
- '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
126
- '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
127
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
128
- '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
129
- '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
130
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
131
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
132
- '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
133
- '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
134
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
135
- '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
136
- '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
137
- '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
138
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
139
- '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
140
- '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
141
- '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
142
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
143
- '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
144
- '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
145
- '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
146
- '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
147
- '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
148
- '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
149
- '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
150
- '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
151
- '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
152
- '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
153
- '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
154
- '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'],
155
-
156
- /**
157
- * 数字转中文速查表
158
- * @Array Of Property
159
- * @trans ['日','一','二','三','四','五','六','七','八','九','十']
160
- * @return Cn string
161
- */
162
- nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'],
163
-
164
- /**
165
- * 日期转农历称呼速查表
166
- * @Array Of Property
167
- * @trans ['初','十','廿','卅']
168
- * @return Cn string
169
- */
170
- nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
171
-
172
- /**
173
- * 月份转农历称呼速查表
174
- * @Array Of Property
175
- * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
176
- * @return Cn string
177
- */
178
- nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'],
179
-
180
- /**
181
- * 返回农历y年一整年的总天数
182
- * @param lunar Year
183
- * @return Number
184
- * @eg:var count = calendar.lYearDays(1987) ;//count=387
185
- */
186
- lYearDays: function (y) {
187
- var i; var sum = 348
188
- for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 }
189
- return (sum + this.leapDays(y))
190
- },
191
-
192
- /**
193
- * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
194
- * @param lunar Year
195
- * @return Number (0-12)
196
- * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
197
- */
198
- leapMonth: function (y) { // 闰字编码 \u95f0
199
- return (this.lunarInfo[y - 1900] & 0xf)
200
- },
201
-
202
- /**
203
- * 返回农历y年闰月的天数 若该年没有闰月则返回0
204
- * @param lunar Year
205
- * @return Number (0、29、30)
206
- * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
207
- */
208
- leapDays: function (y) {
209
- if (this.leapMonth(y)) {
210
- return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
211
- }
212
- return (0)
213
- },
214
-
215
- /**
216
- * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
217
- * @param lunar Year
218
- * @return Number (-1、29、30)
219
- * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
220
- */
221
- monthDays: function (y, m) {
222
- if (m > 12 || m < 1) { return -1 }// 月份参数从1至12,参数错误返回-1
223
- return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
224
- },
225
-
226
- /**
227
- * 返回公历(!)y年m月的天数
228
- * @param solar Year
229
- * @return Number (-1、28、29、30、31)
230
- * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
231
- */
232
- solarDays: function (y, m) {
233
- if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
234
- var ms = m - 1
235
- if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
236
- return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
237
- } else {
238
- return (this.solarMonth[ms])
239
- }
240
- },
241
-
242
- /**
506
+ /**
507
+ * 日期转农历称呼速查表
508
+ * @Array Of Property
509
+ * @trans ['初','十','廿','卅']
510
+ * @return Cn string
511
+ */
512
+ nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
513
+
514
+ /**
515
+ * 月份转农历称呼速查表
516
+ * @Array Of Property
517
+ * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
518
+ * @return Cn string
519
+ */
520
+ nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'],
521
+
522
+ /**
523
+ * 返回农历y年一整年的总天数
524
+ * @param lunar Year
525
+ * @return Number
526
+ * @eg:var count = calendar.lYearDays(1987) ;//count=387
527
+ */
528
+ lYearDays: function (y) {
529
+ var i;
530
+ var sum = 348;
531
+ for (i = 0x8000; i > 0x8; i >>= 1) {
532
+ sum += this.lunarInfo[y - 1900] & i ? 1 : 0;
533
+ }
534
+ return sum + this.leapDays(y);
535
+ },
536
+
537
+ /**
538
+ * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
539
+ * @param lunar Year
540
+ * @return Number (0-12)
541
+ * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
542
+ */
543
+ leapMonth: function (y) {
544
+ // 闰字编码 \u95f0
545
+ return this.lunarInfo[y - 1900] & 0xf;
546
+ },
547
+
548
+ /**
549
+ * 返回农历y年闰月的天数 若该年没有闰月则返回0
550
+ * @param lunar Year
551
+ * @return Number (0、29、30)
552
+ * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
553
+ */
554
+ leapDays: function (y) {
555
+ if (this.leapMonth(y)) {
556
+ return this.lunarInfo[y - 1900] & 0x10000 ? 30 : 29;
557
+ }
558
+ return 0;
559
+ },
560
+
561
+ /**
562
+ * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
563
+ * @param lunar Year
564
+ * @return Number (-1、29、30)
565
+ * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
566
+ */
567
+ monthDays: function (y, m) {
568
+ if (m > 12 || m < 1) {
569
+ return -1;
570
+ } // 月份参数从1至12,参数错误返回-1
571
+ return this.lunarInfo[y - 1900] & (0x10000 >> m) ? 30 : 29;
572
+ },
573
+
574
+ /**
575
+ * 返回公历(!)y年m月的天数
576
+ * @param solar Year
577
+ * @return Number (-1、28、29、30、31)
578
+ * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
579
+ */
580
+ solarDays: function (y, m) {
581
+ if (m > 12 || m < 1) {
582
+ return -1;
583
+ } // 若参数错误 返回-1
584
+ var ms = m - 1;
585
+ if (ms == 1) {
586
+ // 2月份的闰平规律测算后确认返回28或29
587
+ return (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 ? 29 : 28;
588
+ } else {
589
+ return this.solarMonth[ms];
590
+ }
591
+ },
592
+
593
+ /**
243
594
  * 农历年份转换为干支纪年
244
595
  * @param lYear 农历年的年份数
245
596
  * @return Cn string
246
597
  */
247
- toGanZhiYear: function (lYear) {
248
- var ganKey = (lYear - 3) % 10
249
- var zhiKey = (lYear - 3) % 12
250
- if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干
251
- if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支
252
- return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
253
- },
254
-
255
- /**
598
+ toGanZhiYear: function (lYear) {
599
+ var ganKey = (lYear - 3) % 10;
600
+ var zhiKey = (lYear - 3) % 12;
601
+ if (ganKey == 0) ganKey = 10; // 如果余数为0则为最后一个天干
602
+ if (zhiKey == 0) zhiKey = 12; // 如果余数为0则为最后一个地支
603
+ return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1];
604
+ },
605
+
606
+ /**
256
607
  * 公历月、日判断所属星座
257
608
  * @param cMonth [description]
258
609
  * @param cDay [description]
259
610
  * @return Cn string
260
611
  */
261
- toAstro: function (cMonth, cDay) {
262
- var s = '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
263
- var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
264
- return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座
265
- },
266
-
267
- /**
268
- * 传入offset偏移量返回干支
269
- * @param offset 相对甲子的偏移量
270
- * @return Cn string
271
- */
272
- toGanZhi: function (offset) {
273
- return this.Gan[offset % 10] + this.Zhi[offset % 12]
274
- },
275
-
276
- /**
277
- * 传入公历(!)y年获得该年第n个节气的公历日期
278
- * @param y公历年(1900-2100)n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
279
- * @return day Number
280
- * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
281
- */
282
- getTerm: function (y, n) {
283
- if (y < 1900 || y > 2100) { return -1 }
284
- if (n < 1 || n > 24) { return -1 }
285
- var _table = this.sTermInfo[y - 1900]
286
- var _info = [
287
- parseInt('0x' + _table.substr(0, 5)).toString(),
288
- parseInt('0x' + _table.substr(5, 5)).toString(),
289
- parseInt('0x' + _table.substr(10, 5)).toString(),
290
- parseInt('0x' + _table.substr(15, 5)).toString(),
291
- parseInt('0x' + _table.substr(20, 5)).toString(),
292
- parseInt('0x' + _table.substr(25, 5)).toString()
293
- ]
294
- var _calday = [
295
- _info[0].substr(0, 1),
296
- _info[0].substr(1, 2),
297
- _info[0].substr(3, 1),
298
- _info[0].substr(4, 2),
299
-
300
- _info[1].substr(0, 1),
301
- _info[1].substr(1, 2),
302
- _info[1].substr(3, 1),
303
- _info[1].substr(4, 2),
304
-
305
- _info[2].substr(0, 1),
306
- _info[2].substr(1, 2),
307
- _info[2].substr(3, 1),
308
- _info[2].substr(4, 2),
309
-
310
- _info[3].substr(0, 1),
311
- _info[3].substr(1, 2),
312
- _info[3].substr(3, 1),
313
- _info[3].substr(4, 2),
314
-
315
- _info[4].substr(0, 1),
316
- _info[4].substr(1, 2),
317
- _info[4].substr(3, 1),
318
- _info[4].substr(4, 2),
319
-
320
- _info[5].substr(0, 1),
321
- _info[5].substr(1, 2),
322
- _info[5].substr(3, 1),
323
- _info[5].substr(4, 2)
324
- ]
325
- return parseInt(_calday[n - 1])
326
- },
327
-
328
- /**
329
- * 传入农历数字月份返回汉语通俗表示法
330
- * @param lunar month
331
- * @return Cn string
332
- * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
333
- */
334
- toChinaMonth: function (m) { // 月 => \u6708
335
- if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
336
- var s = this.nStr3[m - 1]
337
- s += '\u6708'// 加上月字
338
- return s
339
- },
340
-
341
- /**
342
- * 传入农历日期数字返回汉字表示法
343
- * @param lunar day
344
- * @return Cn string
345
- * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
346
- */
347
- toChinaDay: function (d) { // 日 => \u65e5
348
- var s
349
- switch (d) {
350
- case 10:
351
- s = '\u521d\u5341'; break
352
- case 20:
353
- s = '\u4e8c\u5341'; break
354
- break
355
- case 30:
356
- s = '\u4e09\u5341'; break
357
- break
358
- default :
359
- s = this.nStr2[Math.floor(d / 10)]
360
- s += this.nStr1[d % 10]
361
- }
362
- return (s)
363
- },
364
-
365
- /**
366
- * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
367
- * @param y year
368
- * @return Cn string
369
- * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
370
- */
371
- getAnimal: function (y) {
372
- return this.Animals[(y - 4) % 12]
373
- },
374
-
375
- /**
376
- * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
377
- * @param y solar year
378
- * @param m solar month
379
- * @param d solar day
380
- * @return JSON object
381
- * @eg:console.log(calendar.solar2lunar(1987,11,01));
382
- */
383
- solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31
384
- // 年份限定、上限
385
- if (y < 1900 || y > 2100) {
386
- return -1// undefined转换为数字变为NaN
387
- }
388
- // 公历传参最下限
389
- if (y == 1900 && m == 1 && d < 31) {
390
- return -1
391
- }
392
- // 未传参 获得当天
393
- if (!y) {
394
- var objDate = new Date()
395
- } else {
396
- var objDate = new Date(y, parseInt(m) - 1, d)
397
- }
398
- var i; var leap = 0; var temp = 0
399
- // 修正ymd参数
400
- var y = objDate.getFullYear()
401
- var m = objDate.getMonth() + 1
402
- var d = objDate.getDate()
403
- var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000
404
- for (i = 1900; i < 2101 && offset > 0; i++) {
405
- temp = this.lYearDays(i)
406
- offset -= temp
407
- }
408
- if (offset < 0) {
409
- offset += temp; i--
410
- }
411
-
412
- // 是否今天
413
- var isTodayObj = new Date()
414
- var isToday = false
415
- if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
416
- isToday = true
417
- }
418
- // 星期几
419
- var nWeek = objDate.getDay()
420
- var cWeek = this.nStr1[nWeek]
421
- // 数字表示周几顺应天朝周一开始的惯例
422
- if (nWeek == 0) {
423
- nWeek = 7
424
- }
425
- // 农历年
426
- var year = i
427
- var leap = this.leapMonth(i) // 闰哪个月
428
- var isLeap = false
429
-
430
- // 效验闰月
431
- for (i = 1; i < 13 && offset > 0; i++) {
432
- // 闰月
433
- if (leap > 0 && i == (leap + 1) && isLeap == false) {
434
- --i
435
- isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数
436
- } else {
437
- temp = this.monthDays(year, i)// 计算农历普通月天数
438
- }
439
- // 解除闰月
440
- if (isLeap == true && i == (leap + 1)) { isLeap = false }
441
- offset -= temp
442
- }
443
- // 闰月导致数组下标重叠取反
444
- if (offset == 0 && leap > 0 && i == leap + 1) {
445
- if (isLeap) {
446
- isLeap = false
447
- } else {
448
- isLeap = true; --i
449
- }
450
- }
451
- if (offset < 0) {
452
- offset += temp; --i
453
- }
454
- // 农历月
455
- var month = i
456
- // 农历日
457
- var day = offset + 1
458
- // 天干地支处理
459
- var sm = m - 1
460
- var gzY = this.toGanZhiYear(year)
461
-
462
- // 当月的两个节气
463
- // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
464
- var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始
465
- var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始
466
-
467
- // 依据12节气修正干支月
468
- var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
469
- if (d >= firstNode) {
470
- gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
471
- }
472
-
473
- // 传入的日期的节气与否
474
- var isTerm = false
475
- var Term = null
476
- if (firstNode == d) {
477
- isTerm = true
478
- Term = this.solarTerm[m * 2 - 2]
479
- }
480
- if (secondNode == d) {
481
- isTerm = true
482
- Term = this.solarTerm[m * 2 - 1]
483
- }
484
- // 日柱 当月一日与 1900/1/1 相差天数
485
- var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
486
- var gzD = this.toGanZhi(dayCyclical + d - 1)
487
- // 该日期所属的星座
488
- var astro = this.toAstro(m, d)
489
-
490
- return { 'lYear': year, 'lMonth': month, 'lDay': day, 'Animal': this.getAnimal(year), 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month), 'IDayCn': this.toChinaDay(day), 'cYear': y, 'cMonth': m, 'cDay': d, 'gzYear': gzY, 'gzMonth': gzM, 'gzDay': gzD, 'isToday': isToday, 'isLeap': isLeap, 'nWeek': nWeek, 'ncWeek': '\u661f\u671f' + cWeek, 'isTerm': isTerm, 'Term': Term, 'astro': astro }
491
- },
492
-
493
- /**
494
- * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
495
- * @param y lunar year
496
- * @param m lunar month
497
- * @param d lunar day
498
- * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
499
- * @return JSON object
500
- * @eg:console.log(calendar.lunar2solar(1987,9,10));
501
- */
502
- lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
503
- var isLeapMonth = !!isLeapMonth
504
- var leapOffset = 0
505
- var leapMonth = this.leapMonth(y)
506
- var leapDay = this.leapDays(y)
507
- if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
508
- if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值
509
- var day = this.monthDays(y, m)
510
- var _day = day
511
- // bugFix 2016-9-25
512
- // if month is leap, _day use leapDays method
513
- if (isLeapMonth) {
514
- _day = this.leapDays(y, m)
515
- }
516
- if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验
517
-
518
- // 计算农历的时间差
519
- var offset = 0
520
- for (var i = 1900; i < y; i++) {
521
- offset += this.lYearDays(i)
522
- }
523
- var leap = 0; var isAdd = false
524
- for (var i = 1; i < m; i++) {
525
- leap = this.leapMonth(y)
526
- if (!isAdd) { // 处理闰月
527
- if (leap <= i && leap > 0) {
528
- offset += this.leapDays(y); isAdd = true
612
+ toAstro: function (cMonth, cDay) {
613
+ var s =
614
+ '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf';
615
+ var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
616
+ return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'; // 座
617
+ },
618
+
619
+ /**
620
+ * 传入offset偏移量返回干支
621
+ * @param offset 相对甲子的偏移量
622
+ * @return Cn string
623
+ */
624
+ toGanZhi: function (offset) {
625
+ return this.Gan[offset % 10] + this.Zhi[offset % 12];
626
+ },
627
+
628
+ /**
629
+ * 传入公历(!)y年获得该年第n个节气的公历日期
630
+ * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
631
+ * @return day Number
632
+ * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
633
+ */
634
+ getTerm: function (y, n) {
635
+ if (y < 1900 || y > 2100) {
636
+ return -1;
637
+ }
638
+ if (n < 1 || n > 24) {
639
+ return -1;
640
+ }
641
+ var _table = this.sTermInfo[y - 1900];
642
+ var _info = [
643
+ parseInt('0x' + _table.substr(0, 5)).toString(),
644
+ parseInt('0x' + _table.substr(5, 5)).toString(),
645
+ parseInt('0x' + _table.substr(10, 5)).toString(),
646
+ parseInt('0x' + _table.substr(15, 5)).toString(),
647
+ parseInt('0x' + _table.substr(20, 5)).toString(),
648
+ parseInt('0x' + _table.substr(25, 5)).toString(),
649
+ ];
650
+ var _calday = [
651
+ _info[0].substr(0, 1),
652
+ _info[0].substr(1, 2),
653
+ _info[0].substr(3, 1),
654
+ _info[0].substr(4, 2),
655
+
656
+ _info[1].substr(0, 1),
657
+ _info[1].substr(1, 2),
658
+ _info[1].substr(3, 1),
659
+ _info[1].substr(4, 2),
660
+
661
+ _info[2].substr(0, 1),
662
+ _info[2].substr(1, 2),
663
+ _info[2].substr(3, 1),
664
+ _info[2].substr(4, 2),
665
+
666
+ _info[3].substr(0, 1),
667
+ _info[3].substr(1, 2),
668
+ _info[3].substr(3, 1),
669
+ _info[3].substr(4, 2),
670
+
671
+ _info[4].substr(0, 1),
672
+ _info[4].substr(1, 2),
673
+ _info[4].substr(3, 1),
674
+ _info[4].substr(4, 2),
675
+
676
+ _info[5].substr(0, 1),
677
+ _info[5].substr(1, 2),
678
+ _info[5].substr(3, 1),
679
+ _info[5].substr(4, 2),
680
+ ];
681
+ return parseInt(_calday[n - 1]);
682
+ },
683
+
684
+ /**
685
+ * 传入农历数字月份返回汉语通俗表示法
686
+ * @param lunar month
687
+ * @return Cn string
688
+ * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
689
+ */
690
+ toChinaMonth: function (m) {
691
+ // 月 => \u6708
692
+ if (m > 12 || m < 1) {
693
+ return -1;
694
+ } // 若参数错误 返回-1
695
+ var s = this.nStr3[m - 1];
696
+ s += '\u6708'; // 加上月字
697
+ return s;
698
+ },
699
+
700
+ /**
701
+ * 传入农历日期数字返回汉字表示法
702
+ * @param lunar day
703
+ * @return Cn string
704
+ * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
705
+ */
706
+ toChinaDay: function (d) {
707
+ // => \u65e5
708
+ var s;
709
+ switch (d) {
710
+ case 10:
711
+ s = '\u521d\u5341';
712
+ break;
713
+ case 20:
714
+ s = '\u4e8c\u5341';
715
+ break;
716
+ break;
717
+ case 30:
718
+ s = '\u4e09\u5341';
719
+ break;
720
+ break;
721
+ default:
722
+ s = this.nStr2[Math.floor(d / 10)];
723
+ s += this.nStr1[d % 10];
724
+ }
725
+ return s;
726
+ },
727
+
728
+ /**
729
+ * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
730
+ * @param y year
731
+ * @return Cn string
732
+ * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
733
+ */
734
+ getAnimal: function (y) {
735
+ return this.Animals[(y - 4) % 12];
736
+ },
737
+
738
+ /**
739
+ * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
740
+ * @param y solar year
741
+ * @param m solar month
742
+ * @param d solar day
743
+ * @return JSON object
744
+ * @eg:console.log(calendar.solar2lunar(1987,11,01));
745
+ */
746
+ solar2lunar: function (y, m, d) {
747
+ // 参数区间1900.1.31~2100.12.31
748
+ // 年份限定、上限
749
+ if (y < 1900 || y > 2100) {
750
+ return -1; // undefined转换为数字变为NaN
751
+ }
752
+ // 公历传参最下限
753
+ if (y == 1900 && m == 1 && d < 31) {
754
+ return -1;
755
+ }
756
+ // 未传参 获得当天
757
+ if (!y) {
758
+ var objDate = new Date();
759
+ } else {
760
+ var objDate = new Date(y, parseInt(m) - 1, d);
761
+ }
762
+ var i;
763
+ var leap = 0;
764
+ var temp = 0;
765
+ // 修正ymd参数
766
+ var y = objDate.getFullYear();
767
+ var m = objDate.getMonth() + 1;
768
+ var d = objDate.getDate();
769
+ var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000;
770
+ for (i = 1900; i < 2101 && offset > 0; i++) {
771
+ temp = this.lYearDays(i);
772
+ offset -= temp;
773
+ }
774
+ if (offset < 0) {
775
+ offset += temp;
776
+ i--;
777
+ }
778
+
779
+ // 是否今天
780
+ var isTodayObj = new Date();
781
+ var isToday = false;
782
+ if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
783
+ isToday = true;
784
+ }
785
+ // 星期几
786
+ var nWeek = objDate.getDay();
787
+ var cWeek = this.nStr1[nWeek];
788
+ // 数字表示周几顺应天朝周一开始的惯例
789
+ if (nWeek == 0) {
790
+ nWeek = 7;
791
+ }
792
+ // 农历年
793
+ var year = i;
794
+ var leap = this.leapMonth(i); // 闰哪个月
795
+ var isLeap = false;
796
+
797
+ // 效验闰月
798
+ for (i = 1; i < 13 && offset > 0; i++) {
799
+ // 闰月
800
+ if (leap > 0 && i == leap + 1 && isLeap == false) {
801
+ --i;
802
+ isLeap = true;
803
+ temp = this.leapDays(year); // 计算农历闰月天数
804
+ } else {
805
+ temp = this.monthDays(year, i); // 计算农历普通月天数
806
+ }
807
+ // 解除闰月
808
+ if (isLeap == true && i == leap + 1) {
809
+ isLeap = false;
810
+ }
811
+ offset -= temp;
812
+ }
813
+ // 闰月导致数组下标重叠取反
814
+ if (offset == 0 && leap > 0 && i == leap + 1) {
815
+ if (isLeap) {
816
+ isLeap = false;
817
+ } else {
818
+ isLeap = true;
819
+ --i;
820
+ }
821
+ }
822
+ if (offset < 0) {
823
+ offset += temp;
824
+ --i;
825
+ }
826
+ // 农历月
827
+ var month = i;
828
+ // 农历日
829
+ var day = offset + 1;
830
+ // 天干地支处理
831
+ var sm = m - 1;
832
+ var gzY = this.toGanZhiYear(year);
833
+
834
+ // 当月的两个节气
835
+ // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
836
+ var firstNode = this.getTerm(y, m * 2 - 1); // 返回当月「节」为几日开始
837
+ var secondNode = this.getTerm(y, m * 2); // 返回当月「节」为几日开始
838
+
839
+ // 依据12节气修正干支月
840
+ var gzM = this.toGanZhi((y - 1900) * 12 + m + 11);
841
+ if (d >= firstNode) {
842
+ gzM = this.toGanZhi((y - 1900) * 12 + m + 12);
843
+ }
844
+
845
+ // 传入的日期的节气与否
846
+ var isTerm = false;
847
+ var Term = null;
848
+ if (firstNode == d) {
849
+ isTerm = true;
850
+ Term = this.solarTerm[m * 2 - 2];
851
+ }
852
+ if (secondNode == d) {
853
+ isTerm = true;
854
+ Term = this.solarTerm[m * 2 - 1];
855
+ }
856
+ // 日柱 当月一日与 1900/1/1 相差天数
857
+ var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10;
858
+ var gzD = this.toGanZhi(dayCyclical + d - 1);
859
+ // 该日期所属的星座
860
+ var astro = this.toAstro(m, d);
861
+
862
+ return {
863
+ lYear: year,
864
+ lMonth: month,
865
+ lDay: day,
866
+ Animal: this.getAnimal(year),
867
+ IMonthCn: (isLeap ? '\u95f0' : '') + this.toChinaMonth(month),
868
+ IDayCn: this.toChinaDay(day),
869
+ cYear: y,
870
+ cMonth: m,
871
+ cDay: d,
872
+ gzYear: gzY,
873
+ gzMonth: gzM,
874
+ gzDay: gzD,
875
+ isToday: isToday,
876
+ isLeap: isLeap,
877
+ nWeek: nWeek,
878
+ ncWeek: '\u661f\u671f' + cWeek,
879
+ isTerm: isTerm,
880
+ Term: Term,
881
+ astro: astro,
882
+ };
883
+ },
884
+
885
+ /**
886
+ * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
887
+ * @param y lunar year
888
+ * @param m lunar month
889
+ * @param d lunar day
890
+ * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
891
+ * @return JSON object
892
+ * @eg:console.log(calendar.lunar2solar(1987,9,10));
893
+ */
894
+ lunar2solar: function (y, m, d, isLeapMonth) {
895
+ // 参数区间1900.1.31~2100.12.1
896
+ var isLeapMonth = !!isLeapMonth;
897
+ var leapOffset = 0;
898
+ var leapMonth = this.leapMonth(y);
899
+ var leapDay = this.leapDays(y);
900
+ if (isLeapMonth && leapMonth != m) {
901
+ return -1;
902
+ } // 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
903
+ if ((y == 2100 && m == 12 && d > 1) || (y == 1900 && m == 1 && d < 31)) {
904
+ return -1;
905
+ } // 超出了最大极限值
906
+ var day = this.monthDays(y, m);
907
+ var _day = day;
908
+ // bugFix 2016-9-25
909
+ // if month is leap, _day use leapDays method
910
+ if (isLeapMonth) {
911
+ _day = this.leapDays(y, m);
912
+ }
913
+ if (y < 1900 || y > 2100 || d > _day) {
914
+ return -1;
915
+ } // 参数合法性效验
916
+
917
+ // 计算农历的时间差
918
+ var offset = 0;
919
+ for (var i = 1900; i < y; i++) {
920
+ offset += this.lYearDays(i);
921
+ }
922
+ var leap = 0;
923
+ var isAdd = false;
924
+ for (var i = 1; i < m; i++) {
925
+ leap = this.leapMonth(y);
926
+ if (!isAdd) {
927
+ // 处理闰月
928
+ if (leap <= i && leap > 0) {
929
+ offset += this.leapDays(y);
930
+ isAdd = true;
931
+ }
932
+ }
933
+ offset += this.monthDays(y, i);
934
+ }
935
+ // 转换闰月农历 需补充该年闰月的前一个月的时差
936
+ if (isLeapMonth) {
937
+ offset += day;
529
938
  }
530
- }
531
- offset += this.monthDays(y, i)
532
- }
533
- // 转换闰月农历 需补充该年闰月的前一个月的时差
534
- if (isLeapMonth) { offset += day }
535
- // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
536
- var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
537
- var calObj = new Date((offset + d - 31) * 86400000 + stmap)
538
- var cY = calObj.getUTCFullYear()
539
- var cM = calObj.getUTCMonth() + 1
540
- var cD = calObj.getUTCDate()
541
-
542
- return this.solar2lunar(cY, cM, cD)
543
- }
544
- }
545
-
546
- export default calendar
939
+ // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
940
+ var stmap = Date.UTC(1900, 1, 30, 0, 0, 0);
941
+ var calObj = new Date((offset + d - 31) * 86400000 + stmap);
942
+ var cY = calObj.getUTCFullYear();
943
+ var cM = calObj.getUTCMonth() + 1;
944
+ var cD = calObj.getUTCDate();
945
+
946
+ return this.solar2lunar(cY, cM, cD);
947
+ },
948
+ };
949
+
950
+ export default calendar;