@10yun/cv-mobile-ui 0.5.29 → 0.5.30

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 (260) hide show
  1. package/package.json +1 -1
  2. package/plugins/luch-request/adapters/index.js +131 -0
  3. package/plugins/luch-request/core/InterceptorManager.js +50 -0
  4. package/plugins/luch-request/core/Request.js +199 -0
  5. package/plugins/luch-request/core/buildFullPath.js +20 -0
  6. package/plugins/luch-request/core/defaults.js +32 -0
  7. package/plugins/luch-request/core/dispatchRequest.js +5 -0
  8. package/plugins/luch-request/core/mergeConfig.js +125 -0
  9. package/plugins/luch-request/core/settle.js +16 -0
  10. package/plugins/luch-request/helpers/buildURL.js +71 -0
  11. package/plugins/luch-request/helpers/combineURLs.js +12 -0
  12. package/plugins/luch-request/helpers/isAbsoluteURL.js +14 -0
  13. package/plugins/luch-request/index.d.ts +197 -0
  14. package/plugins/luch-request/index.js +2 -0
  15. package/plugins/luch-request/readme.md +3 -0
  16. package/plugins/luch-request/utils/clone.js +264 -0
  17. package/plugins/luch-request/utils.js +131 -0
  18. package/plugins/request.js +2 -2
  19. package/ui-cv/components/cv-form-item/cv-form-item.vue +1 -1
  20. package/ui-fireui/fui-actionsheet/fui-actionsheet.vue +202 -0
  21. package/ui-fireui/fui-alert/fui-alert.vue +141 -0
  22. package/ui-fireui/fui-badge/fui-badge.vue +158 -0
  23. package/ui-fireui/fui-bottom-navigation/fui-bottom-navigation.vue +390 -0
  24. package/ui-fireui/fui-bottom-popup/fui-bottom-popup.vue +100 -0
  25. package/ui-fireui/fui-bubble-popup/fui-bubble-popup.vue +236 -0
  26. package/ui-fireui/fui-button/fui-button.vue +424 -0
  27. package/ui-fireui/fui-calendar/fui-calendar.js +915 -0
  28. package/ui-fireui/fui-calendar/fui-calendar.vue +868 -0
  29. package/ui-fireui/fui-card/fui-card.vue +231 -0
  30. package/ui-fireui/fui-cascade-selection/fui-cascade-selection.vue +538 -0
  31. package/ui-fireui/fui-circular-progress/fui-circular-progress.vue +261 -0
  32. package/ui-fireui/fui-collapse/fui-collapse.vue +179 -0
  33. package/ui-fireui/fui-countdown/fui-countdown.vue +301 -0
  34. package/ui-fireui/fui-datetime/fui-datetime.vue +570 -0
  35. package/ui-fireui/fui-divider/fui-divider.vue +118 -0
  36. package/ui-fireui/fui-drawer/fui-drawer.vue +103 -0
  37. package/ui-fireui/fui-dropdown-list/fui-dropdown-list.vue +70 -0
  38. package/ui-fireui/fui-fab/fui-fab.vue +284 -0
  39. package/ui-fireui/fui-footer/fui-footer.vue +131 -0
  40. package/ui-fireui/fui-grid/fui-grid.vue +42 -0
  41. package/ui-fireui/fui-grid-item/fui-grid-item.vue +142 -0
  42. package/ui-fireui/fui-icon/fui-icon.vue +820 -0
  43. package/ui-fireui/fui-image-cropper/fui-image-cropper.vue +1058 -0
  44. package/ui-fireui/fui-image-group/fui-image-group.vue +149 -0
  45. package/ui-fireui/fui-keyboard/fui-keyboard.vue +254 -0
  46. package/ui-fireui/fui-keyboard-input/fui-keyboard-input.vue +78 -0
  47. package/ui-fireui/fui-list-cell/fui-list-cell.vue +178 -0
  48. package/ui-fireui/fui-list-view/fui-list-view.vue +87 -0
  49. package/ui-fireui/fui-loading/fui-loading.vue +78 -0
  50. package/ui-fireui/fui-loadmore/fui-loadmore.vue +163 -0
  51. package/ui-fireui/fui-modal/fui-modal.vue +392 -0
  52. package/ui-fireui/fui-navigation-bar/fui-navigation-bar.vue +180 -0
  53. package/ui-fireui/fui-no-data/fui-no-data.vue +116 -0
  54. package/ui-fireui/fui-nomore/fui-nomore.vue +116 -0
  55. package/ui-fireui/fui-numberbox/fui-numberbox.vue +234 -0
  56. package/ui-fireui/fui-numberbox-border/fui-numberbox-border.vue +232 -0
  57. package/ui-fireui/fui-picture-cropper/fui-picture-cropper.vue +682 -0
  58. package/ui-fireui/fui-picture-cropper/fui-picture-cropper.wxs +560 -0
  59. package/ui-fireui/fui-rate/fui-rate.vue +167 -0
  60. package/ui-fireui/fui-round-progress/fui-round-progress.vue +306 -0
  61. package/ui-fireui/fui-scroll-top/fui-scroll-top.vue +189 -0
  62. package/ui-fireui/fui-sharemodel/fui-sharemodel.vue +181 -0
  63. package/ui-fireui/fui-skeleton/fui-skeleton.vue +248 -0
  64. package/ui-fireui/fui-steps/fui-steps.vue +214 -0
  65. package/ui-fireui/fui-sticky/fui-sticky.vue +155 -0
  66. package/ui-fireui/fui-sticky-wxs/fui-sticky-wxs.vue +133 -0
  67. package/ui-fireui/fui-sticky-wxs/fui-sticky.wxs +44 -0
  68. package/ui-fireui/fui-swipe-action/fui-swipe-action.vue +301 -0
  69. package/ui-fireui/fui-tabbar/fui-tabbar.vue +283 -0
  70. package/ui-fireui/fui-tabs/fui-tabs.vue +284 -0
  71. package/ui-fireui/fui-tabs2/fui-tabs2.vue +284 -0
  72. package/ui-fireui/fui-tag/fui-tag.vue +374 -0
  73. package/ui-fireui/fui-time-axis/fui-time-axis.vue +36 -0
  74. package/ui-fireui/fui-timeaxis-item/fui-timeaxis-item.vue +48 -0
  75. package/ui-fireui/fui-tips/fui-tips.vue +161 -0
  76. package/ui-fireui/fui-toast/fui-toast.vue +117 -0
  77. package/ui-fireui/fui-top-dropdown/fui-top-dropdown.vue +129 -0
  78. package/ui-fireui/fui-upload/fui-upload.vue +446 -0
  79. package/ui-fireui/fui-uploadsamll/fui-uploadsamll.vue +472 -0
  80. package/uview-plus/README.md +1 -1
  81. package/uview-plus/changelog-wu-tool.md +21 -0
  82. package/uview-plus/changelog-wu.md +91 -0
  83. package/uview-plus/components/u-action-sheet/_doc/changelog.md +12 -0
  84. package/uview-plus/components/u-action-sheet/_doc/package.json +92 -0
  85. package/uview-plus/components/u-action-sheet/_doc/readme.md +16 -0
  86. package/uview-plus/components/u-app-update/_doc/changelog.md +26 -0
  87. package/uview-plus/components/u-app-update/_doc/package.json +89 -0
  88. package/uview-plus/components/u-app-update/_doc/readme.md +16 -0
  89. package/uview-plus/components/u-app-update/config.js +120 -0
  90. package/uview-plus/components/u-app-update/img/act.png +0 -0
  91. package/uview-plus/components/u-app-update/img/appUploadAlertBoxBg.png +0 -0
  92. package/uview-plus/components/u-app-update/img/close.png +0 -0
  93. package/uview-plus/components/u-app-update/js-sdk/checkVersion.js +81 -0
  94. package/uview-plus/components/u-app-update/js-sdk/silentlyAppUpdate.js +41 -0
  95. package/uview-plus/components/u-app-update/pages/index.vue +8 -0
  96. package/uview-plus/components/u-app-update/u-app-update.vue +583 -0
  97. package/uview-plus/components/u-button-wu/_doc/changelog.md +6 -0
  98. package/uview-plus/components/u-button-wu/_doc/package.json +89 -0
  99. package/uview-plus/components/u-button-wu/_doc/readme.md +16 -0
  100. package/uview-plus/components/u-button-wu/u-button-wu.vue +522 -0
  101. package/uview-plus/components/u-button-wu/vue.scss +81 -0
  102. package/uview-plus/components/u-calendar-wu/_doc/changelog.md +145 -0
  103. package/uview-plus/components/u-calendar-wu/_doc/package.json +90 -0
  104. package/uview-plus/components/u-calendar-wu/_doc/readme.md +16 -0
  105. package/uview-plus/components/u-calendar-wu/calendar.js +664 -0
  106. package/uview-plus/components/u-calendar-wu/i18n/en.json +14 -0
  107. package/uview-plus/components/u-calendar-wu/i18n/index.js +8 -0
  108. package/uview-plus/components/u-calendar-wu/i18n/zh-Hans.json +14 -0
  109. package/uview-plus/components/u-calendar-wu/i18n/zh-Hant.json +14 -0
  110. package/uview-plus/components/u-calendar-wu/props.js +166 -0
  111. package/uview-plus/components/u-calendar-wu/style.css +196 -0
  112. package/uview-plus/components/u-calendar-wu/u-calendar-wu.vue +921 -0
  113. package/uview-plus/components/u-calendar-wu/util.js +552 -0
  114. package/uview-plus/components/u-calendar-wu/wu-calendar-block/props.js +73 -0
  115. package/uview-plus/components/u-calendar-wu/wu-calendar-block/wu-calendar-block.vue +122 -0
  116. package/uview-plus/components/u-calendar-wu/wu-calendar-item/props.js +55 -0
  117. package/uview-plus/components/u-calendar-wu/wu-calendar-item/wu-calendar-item.vue +293 -0
  118. package/uview-plus/components/u-cell/_doc/changelog.md +6 -0
  119. package/uview-plus/components/u-cell/_doc/package.json +89 -0
  120. package/uview-plus/components/u-cell/_doc/readme.md +25 -0
  121. package/uview-plus/components/u-checkbox/_doc/changelog.md +8 -0
  122. package/uview-plus/components/u-checkbox/_doc/package.json +88 -0
  123. package/uview-plus/components/u-checkbox/_doc/readme.md +25 -0
  124. package/uview-plus/components/u-code/_doc/changelog.md +6 -0
  125. package/uview-plus/components/u-code/_doc/package.json +86 -0
  126. package/uview-plus/components/u-code/_doc/readme.md +16 -0
  127. package/uview-plus/components/u-drag-sort/_doc/changelog.md +0 -0
  128. package/uview-plus/components/u-drag-sort/_doc/package.json +85 -0
  129. package/uview-plus/components/u-drag-sort/_doc/readme.md +16 -0
  130. package/uview-plus/components/u-drag-sort/u-drag-sort.vue +3 -0
  131. package/uview-plus/components/u-empty/u-empty.vue +27 -1
  132. package/uview-plus/components/u-gap/_doc/changelog.md +4 -0
  133. package/uview-plus/components/u-gap/_doc/package.json +86 -0
  134. package/uview-plus/components/u-gap/_doc/readme.md +22 -0
  135. package/uview-plus/components/u-icon/_doc/changelog.md +10 -0
  136. package/uview-plus/components/u-icon/_doc/package.json +85 -0
  137. package/uview-plus/components/u-icon/_doc/readme.md +10 -0
  138. package/uview-plus/components/u-icon/icon.js +23 -25
  139. package/uview-plus/components/u-icon/icons.js +213 -213
  140. package/uview-plus/components/u-icon/style.css +3 -3
  141. package/uview-plus/components/u-icon/u-icon2.vue +149 -0
  142. package/uview-plus/components/u-image-wu/_doc/changelog.md +21 -0
  143. package/uview-plus/components/u-image-wu/_doc/package.json +88 -0
  144. package/uview-plus/components/u-image-wu/_doc/readme.md +11 -0
  145. package/uview-plus/components/u-image-wu/props.js +94 -0
  146. package/uview-plus/components/u-image-wu/u-image-wu.vue +243 -0
  147. package/uview-plus/components/u-input/_doc/changelog.md +6 -0
  148. package/uview-plus/components/u-input/_doc/package.json +88 -0
  149. package/uview-plus/components/u-input/_doc/readme.md +16 -0
  150. package/uview-plus/components/u-line/_doc/changelog.md +8 -0
  151. package/uview-plus/components/u-line/_doc/package.json +86 -0
  152. package/uview-plus/components/u-line/_doc/readme.md +16 -0
  153. package/uview-plus/components/u-link/_doc/changelog.md +8 -0
  154. package/uview-plus/components/u-link/_doc/package.json +86 -0
  155. package/uview-plus/components/u-link/_doc/readme.md +20 -0
  156. package/uview-plus/components/u-loading-icon/_doc/changelog.md +12 -0
  157. package/uview-plus/components/u-loading-icon/_doc/package.json +86 -0
  158. package/uview-plus/components/u-loading-icon/_doc/readme.md +16 -0
  159. package/uview-plus/components/u-loading-icon/props.js +1 -1
  160. package/uview-plus/components/u-navbar/_doc/changelog.md +6 -0
  161. package/uview-plus/components/u-navbar/_doc/package.json +89 -0
  162. package/uview-plus/components/u-navbar/_doc/readme.md +16 -0
  163. package/uview-plus/components/u-navbar-wu/props.js +102 -0
  164. package/uview-plus/components/u-navbar-wu/u-navbar-wu.vue +196 -0
  165. package/uview-plus/components/u-number-box/_doc/changelog.md +19 -0
  166. package/uview-plus/components/u-number-box/_doc/package.json +88 -0
  167. package/uview-plus/components/u-number-box/_doc/readme.md +16 -0
  168. package/uview-plus/components/u-overlay/_doc/changelog.md +4 -0
  169. package/uview-plus/components/u-overlay/_doc/package.json +88 -0
  170. package/uview-plus/components/u-overlay/_doc/readme.md +16 -0
  171. package/uview-plus/components/u-popup/_doc/changelog.md +4 -0
  172. package/uview-plus/components/u-popup/_doc/package.json +92 -0
  173. package/uview-plus/components/u-popup/_doc/readme.md +16 -0
  174. package/uview-plus/components/u-popup-wu/keypress.js +45 -0
  175. package/uview-plus/components/u-popup-wu/u-popup-wu.vue +519 -0
  176. package/uview-plus/components/u-radio/_doc/changelog.md +6 -0
  177. package/uview-plus/components/u-radio/_doc/package.json +88 -0
  178. package/uview-plus/components/u-radio/_doc/readme.md +25 -0
  179. package/uview-plus/components/u-row/_doc/changelog.md +8 -0
  180. package/uview-plus/components/u-row/_doc/package.json +86 -0
  181. package/uview-plus/components/u-row/_doc/readme.md +16 -0
  182. package/uview-plus/components/u-safe-bottom/_doc/changelog.md +6 -0
  183. package/uview-plus/components/u-safe-bottom/_doc/package.json +86 -0
  184. package/uview-plus/components/u-safe-bottom/_doc/readme.md +16 -0
  185. package/uview-plus/components/u-sku-wu/_doc/changelog.md +27 -0
  186. package/uview-plus/components/u-sku-wu/_doc/package.json +93 -0
  187. package/uview-plus/components/u-sku-wu/_doc/readme.md +16 -0
  188. package/uview-plus/components/u-sku-wu/props.js +86 -0
  189. package/uview-plus/components/u-sku-wu/style.css +271 -0
  190. package/uview-plus/components/u-sku-wu/u-sku-wu.vue +864 -0
  191. package/uview-plus/components/u-status-bar/_doc/changelog.md +4 -0
  192. package/uview-plus/components/u-status-bar/_doc/package.json +86 -0
  193. package/uview-plus/components/u-status-bar/_doc/readme.md +16 -0
  194. package/uview-plus/components/u-text/_doc/changelog.md +10 -0
  195. package/uview-plus/components/u-text/_doc/package.json +89 -0
  196. package/uview-plus/components/u-text/_doc/readme.md +20 -0
  197. package/uview-plus/components/u-textarea/_doc/changelog.md +6 -0
  198. package/uview-plus/components/u-textarea/_doc/package.json +86 -0
  199. package/uview-plus/components/u-textarea/_doc/readme.md +25 -0
  200. package/uview-plus/components/u-transition/_doc/changelog.md +14 -0
  201. package/uview-plus/components/u-transition/_doc/package.json +86 -0
  202. package/uview-plus/components/u-transition/_doc/readme.md +16 -0
  203. package/uview-plus/components/u-transition-wu/createAnimation.js +148 -0
  204. package/uview-plus/components/u-transition-wu/props.js +32 -0
  205. package/uview-plus/components/u-transition-wu/u-transition.vue +300 -0
  206. package/uview-plus/components/u-verification-code/u-verification-code.vue +161 -0
  207. package/uview-plus/index.js +107 -94
  208. package/uview-plus/libs/config/config.js +46 -48
  209. package/uview-plus/libs/css/color.scss +32 -311
  210. package/uview-plus/libs/css/components-wu.scss +30 -0
  211. package/uview-plus/libs/css/vue.scss +10 -10
  212. package/uview-plus/libs/function/calc.js +61 -55
  213. package/uview-plus/libs/function/cc.js +66 -0
  214. package/uview-plus/libs/function/color/color-convert/CHANGELOG.md +54 -0
  215. package/uview-plus/libs/function/color/color-convert/LICENSE +21 -0
  216. package/uview-plus/libs/function/color/color-convert/README.md +68 -0
  217. package/uview-plus/libs/function/color/color-convert/conversions.js +839 -0
  218. package/uview-plus/libs/function/color/color-convert/index.js +81 -0
  219. package/uview-plus/libs/function/color/color-convert/package.json +48 -0
  220. package/uview-plus/libs/function/color/color-convert/route.js +97 -0
  221. package/uview-plus/libs/function/color/color-name/LICENSE +8 -0
  222. package/uview-plus/libs/function/color/color-name/README.md +11 -0
  223. package/uview-plus/libs/function/color/color-name/index.js +152 -0
  224. package/uview-plus/libs/function/color/color-name/package.json +28 -0
  225. package/uview-plus/libs/function/color/color-string/LICENSE +21 -0
  226. package/uview-plus/libs/function/color/color-string/README.md +62 -0
  227. package/uview-plus/libs/function/color/color-string/index.js +244 -0
  228. package/uview-plus/libs/function/color/color-string/package.json +39 -0
  229. package/uview-plus/libs/function/color/color.js +496 -0
  230. package/uview-plus/libs/function/color/index.js +158 -0
  231. package/uview-plus/libs/function/color/is-arrayish/LICENSE +21 -0
  232. package/uview-plus/libs/function/color/is-arrayish/README.md +16 -0
  233. package/uview-plus/libs/function/color/is-arrayish/index.js +9 -0
  234. package/uview-plus/libs/function/color/is-arrayish/package.json +45 -0
  235. package/uview-plus/libs/function/color/is-arrayish/yarn-error.log +1443 -0
  236. package/uview-plus/libs/function/color/simple-swizzle/LICENSE +21 -0
  237. package/uview-plus/libs/function/color/simple-swizzle/README.md +39 -0
  238. package/uview-plus/libs/function/color/simple-swizzle/index.js +29 -0
  239. package/uview-plus/libs/function/color/simple-swizzle/package.json +36 -0
  240. package/uview-plus/libs/function/colorGradient.js +108 -106
  241. package/uview-plus/libs/function/debounce.js +17 -17
  242. package/uview-plus/libs/function/digit.js +1 -3
  243. package/uview-plus/libs/function/http.js +3 -3
  244. package/uview-plus/libs/function/index-wu.js +231 -0
  245. package/uview-plus/libs/function/index.js +579 -566
  246. package/uview-plus/libs/function/platform.js +18 -18
  247. package/uview-plus/libs/function/test.js +135 -137
  248. package/uview-plus/libs/function/throttle.js +17 -17
  249. package/uview-plus/libs/luch-request/core/Request.js +199 -199
  250. package/uview-plus/libs/mixin/mpMixin.js +1 -0
  251. package/uview-plus/libs/mixin/openType.js +33 -0
  252. package/uview-plus/libs/util/async-validator.js +1343 -1343
  253. package/uview-plus/libs/util/dayjs.js +404 -0
  254. package/uview-plus/libs/util/route.js +101 -105
  255. package/uview-plus/package-wu-tool.json +84 -0
  256. package/uview-plus/package-wu.json +112 -0
  257. package/uview-plus/package.json +106 -95
  258. package/uview-plus/readme-wu.md +148 -0
  259. package/uview-ui/index.js +51 -52
  260. package/plugins/uni-upgrade.js +0 -294
@@ -0,0 +1,664 @@
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
+ */
14
+ /* eslint-disable */
15
+ var calendar = {
16
+
17
+ /**
18
+ * 农历1900-2100的润大小信息表
19
+ * @Array Of Property
20
+ * @return Hex
21
+ */
22
+ lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0,
23
+ 0x055d2, // 1900-1909
24
+ 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
25
+ 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
26
+ 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
27
+ 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
28
+ 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
29
+ 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
30
+ 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
31
+ 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
32
+ 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
33
+ 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
34
+ 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
35
+ 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
36
+ 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
37
+ 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
38
+ /** Add By JJonline@JJonline.Cn**/
39
+ 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
40
+ 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
41
+ 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
42
+ 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
43
+ 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
44
+ 0x0d520
45
+ ], // 2100
46
+
47
+ /**
48
+ * 公历每个月份的天数普通表
49
+ * @Array Of Property
50
+ * @return Number
51
+ */
52
+ solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
53
+
54
+ /**
55
+ * 天干地支之天干速查表
56
+ * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
57
+ * @return Cn string
58
+ */
59
+ Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
60
+
61
+ /**
62
+ * 天干地支之地支速查表
63
+ * @Array Of Property
64
+ * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
65
+ * @return Cn string
66
+ */
67
+ Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149',
68
+ '\u620c', '\u4ea5'
69
+ ],
70
+
71
+ /**
72
+ * 天干地支之地支速查表<=>生肖
73
+ * @Array Of Property
74
+ * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
75
+ * @return Cn string
76
+ */
77
+ Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21',
78
+ '\u72d7', '\u732a'
79
+ ],
80
+
81
+ /**
82
+ * 24节气速查表
83
+ * @Array Of Property
84
+ * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
85
+ * @return Cn string
86
+ */
87
+ solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206',
88
+ '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3',
89
+ '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206',
90
+ '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'
91
+ ],
92
+
93
+ /**
94
+ * 1900-2100各年的24节气日期速查表
95
+ * @Array Of Property
96
+ * @return 0x string For splice
97
+ */
98
+ sTermInfo: [
99
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f',
100
+ '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
101
+ '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
102
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
103
+ 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
104
+ '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
105
+ '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
106
+ '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
107
+ '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
108
+ '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
109
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
110
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
111
+ '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
112
+ '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
113
+ '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
114
+ '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
115
+ '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
116
+ '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
117
+ '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
118
+ '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
119
+ '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
120
+ '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
121
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
122
+ '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
123
+ '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
124
+ '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
125
+ '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
126
+ '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
127
+ '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
128
+ '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
129
+ '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
130
+ '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
131
+ '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
132
+ '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
133
+ '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
134
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
135
+ '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
136
+ '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
137
+ '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
138
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
139
+ '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
140
+ '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
141
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
142
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
143
+ '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
144
+ '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
145
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
146
+ '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
147
+ '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
148
+ '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
149
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
150
+ '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
151
+ '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
152
+ '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
153
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
154
+ '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
155
+ '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
156
+ '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
157
+ '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
158
+ '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
159
+ '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
160
+ '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
161
+ '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
162
+ '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
163
+ '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
164
+ '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
165
+ '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'
166
+ ],
167
+
168
+ festivals: {
169
+ '1-1': '元旦',
170
+ '2-14': '情人节',
171
+ '3-8': '妇女节',
172
+ '3-12': '植树节',
173
+ '4-1': '愚人节',
174
+ '5-1': '劳动节',
175
+ '5-4': '青年节',
176
+ '5-12': '护士节',
177
+ '6-1': '儿童节',
178
+ '8-1': '建军节',
179
+ '9-10': '教师节',
180
+ '10-1': '国庆',
181
+ '11-1': '万圣节',
182
+ '12-24': '圣诞节',
183
+ '正月初一': '春节',
184
+ '二月初二': '龙抬头',
185
+ '五月初五': '端午节',
186
+ '七月初七': '七夕节',
187
+ '七月十五': '中元节',
188
+ '八月十五': '中秋节',
189
+ '九月初九': '重阳节',
190
+ '腊月初八': '腊八节',
191
+ '腊月廿三': '小年',
192
+ '腊月三十': '除夕',
193
+ },
194
+
195
+ /**
196
+ * 数字转中文速查表
197
+ * @Array Of Property
198
+ * @trans ['日','一','二','三','四','五','六','七','八','九','十']
199
+ * @return Cn string
200
+ */
201
+ nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d',
202
+ '\u5341'
203
+ ],
204
+
205
+ /**
206
+ * 日期转农历称呼速查表
207
+ * @Array Of Property
208
+ * @trans ['初','十','廿','卅']
209
+ * @return Cn string
210
+ */
211
+ nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
212
+
213
+ /**
214
+ * 月份转农历称呼速查表
215
+ * @Array Of Property
216
+ * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
217
+ * @return Cn string
218
+ */
219
+ nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341',
220
+ '\u51ac', '\u814a'
221
+ ],
222
+
223
+ /**
224
+ * 返回农历y年一整年的总天数
225
+ * @param lunar Year
226
+ * @return Number
227
+ * @eg:var count = calendar.lYearDays(1987) ;//count=387
228
+ */
229
+ lYearDays: function(y) {
230
+ var i;
231
+ var sum = 348
232
+ for (i = 0x8000; i > 0x8; i >>= 1) {
233
+ sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0
234
+ }
235
+ return (sum + this.leapDays(y))
236
+ },
237
+
238
+ /**
239
+ * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
240
+ * @param lunar Year
241
+ * @return Number (0-12)
242
+ * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
243
+ */
244
+ leapMonth: function(y) { // 闰字编码 \u95f0
245
+ return (this.lunarInfo[y - 1900] & 0xf)
246
+ },
247
+
248
+ /**
249
+ * 返回农历y年闰月的天数 若该年没有闰月则返回0
250
+ * @param lunar Year
251
+ * @return Number (0、29、30)
252
+ * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
253
+ */
254
+ leapDays: function(y) {
255
+ if (this.leapMonth(y)) {
256
+ return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
257
+ }
258
+ return (0)
259
+ },
260
+
261
+ /**
262
+ * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
263
+ * @param lunar Year
264
+ * @return Number (-1、29、30)
265
+ * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
266
+ */
267
+ monthDays: function(y, m) {
268
+ if (m > 12 || m < 1) {
269
+ return -1
270
+ } // 月份参数从1至12,参数错误返回-1
271
+ return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
272
+ },
273
+
274
+ /**
275
+ * 返回公历(!)y年m月的天数
276
+ * @param solar Year
277
+ * @return Number (-1、28、29、30、31)
278
+ * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
279
+ */
280
+ solarDays: function(y, m) {
281
+ if (m > 12 || m < 1) {
282
+ return -1
283
+ } // 若参数错误 返回-1
284
+ var ms = m - 1
285
+ if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
286
+ return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
287
+ } else {
288
+ return (this.solarMonth[ms])
289
+ }
290
+ },
291
+
292
+ /**
293
+ * 农历年份转换为干支纪年
294
+ * @param lYear 农历年的年份数
295
+ * @return Cn string
296
+ */
297
+ toGanZhiYear: function(lYear) {
298
+ var ganKey = (lYear - 3) % 10
299
+ var zhiKey = (lYear - 3) % 12
300
+ if (ganKey == 0) ganKey = 10 // 如果余数为0则为最后一个天干
301
+ if (zhiKey == 0) zhiKey = 12 // 如果余数为0则为最后一个地支
302
+ return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
303
+ },
304
+
305
+ /**
306
+ * 公历月、日判断所属星座
307
+ * @param cMonth [description]
308
+ * @param cDay [description]
309
+ * @return Cn string
310
+ */
311
+ toAstro: function(cMonth, cDay) {
312
+ var s =
313
+ '\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'
314
+ var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
315
+ return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7' // 座
316
+ },
317
+
318
+ /**
319
+ * 传入offset偏移量返回干支
320
+ * @param offset 相对甲子的偏移量
321
+ * @return Cn string
322
+ */
323
+ toGanZhi: function(offset) {
324
+ return this.Gan[offset % 10] + this.Zhi[offset % 12]
325
+ },
326
+
327
+ /**
328
+ * 传入公历(!)y年获得该年第n个节气的公历日期
329
+ * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
330
+ * @return day Number
331
+ * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
332
+ */
333
+ getTerm: function(y, n) {
334
+ if (y < 1900 || y > 2100) {
335
+ return -1
336
+ }
337
+ if (n < 1 || n > 24) {
338
+ return -1
339
+ }
340
+ var _table = this.sTermInfo[y - 1900]
341
+ var _info = [
342
+ parseInt('0x' + _table.substr(0, 5)).toString(),
343
+ parseInt('0x' + _table.substr(5, 5)).toString(),
344
+ parseInt('0x' + _table.substr(10, 5)).toString(),
345
+ parseInt('0x' + _table.substr(15, 5)).toString(),
346
+ parseInt('0x' + _table.substr(20, 5)).toString(),
347
+ parseInt('0x' + _table.substr(25, 5)).toString()
348
+ ]
349
+ var _calday = [
350
+ _info[0].substr(0, 1),
351
+ _info[0].substr(1, 2),
352
+ _info[0].substr(3, 1),
353
+ _info[0].substr(4, 2),
354
+
355
+ _info[1].substr(0, 1),
356
+ _info[1].substr(1, 2),
357
+ _info[1].substr(3, 1),
358
+ _info[1].substr(4, 2),
359
+
360
+ _info[2].substr(0, 1),
361
+ _info[2].substr(1, 2),
362
+ _info[2].substr(3, 1),
363
+ _info[2].substr(4, 2),
364
+
365
+ _info[3].substr(0, 1),
366
+ _info[3].substr(1, 2),
367
+ _info[3].substr(3, 1),
368
+ _info[3].substr(4, 2),
369
+
370
+ _info[4].substr(0, 1),
371
+ _info[4].substr(1, 2),
372
+ _info[4].substr(3, 1),
373
+ _info[4].substr(4, 2),
374
+
375
+ _info[5].substr(0, 1),
376
+ _info[5].substr(1, 2),
377
+ _info[5].substr(3, 1),
378
+ _info[5].substr(4, 2)
379
+ ]
380
+ return parseInt(_calday[n - 1])
381
+ },
382
+
383
+ /**
384
+ * 传入农历数字月份返回汉语通俗表示法
385
+ * @param lunar month
386
+ * @return Cn string
387
+ * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
388
+ */
389
+ toChinaMonth: function(m) { // 月 => \u6708
390
+ if (m > 12 || m < 1) {
391
+ return -1
392
+ } // 若参数错误 返回-1
393
+ var s = this.nStr3[m - 1]
394
+ s += '\u6708' // 加上月字
395
+ return s
396
+ },
397
+
398
+ /**
399
+ * 传入农历日期数字返回汉字表示法
400
+ * @param lunar day
401
+ * @return Cn string
402
+ * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
403
+ */
404
+ toChinaDay: function(d) { // 日 => \u65e5
405
+ var s
406
+ switch (d) {
407
+ case 10:
408
+ s = '\u521d\u5341';
409
+ break
410
+ case 20:
411
+ s = '\u4e8c\u5341';
412
+ break
413
+ break
414
+ case 30:
415
+ s = '\u4e09\u5341';
416
+ break
417
+ break
418
+ default:
419
+ s = this.nStr2[Math.floor(d / 10)]
420
+ s += this.nStr1[d % 10]
421
+ }
422
+ return (s)
423
+ },
424
+
425
+ /**
426
+ * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
427
+ * @param y year
428
+ * @return Cn string
429
+ * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
430
+ */
431
+ getAnimal: function(y) {
432
+ return this.Animals[(y - 4) % 12]
433
+ },
434
+
435
+ /**
436
+ * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
437
+ * @param y solar year
438
+ * @param m solar month
439
+ * @param d solar day
440
+ * @return JSON object
441
+ * @eg:console.log(calendar.solar2lunar(1987,11,01));
442
+ */
443
+ solar2lunar: function(y, m, d) { // 参数区间1900.1.31~2100.12.31
444
+ // 年份限定、上限
445
+ if (y < 1900 || y > 2100) {
446
+ return -1 // undefined转换为数字变为NaN
447
+ }
448
+ // 公历传参最下限
449
+ if (y == 1900 && m == 1 && d < 31) {
450
+ return -1
451
+ }
452
+ // 未传参 获得当天
453
+ if (!y) {
454
+ var objDate = new Date()
455
+ } else {
456
+ var objDate = new Date(y, parseInt(m) - 1, d)
457
+ }
458
+ var i;
459
+ var leap = 0;
460
+ var temp = 0
461
+ // 修正ymd参数
462
+ var y = objDate.getFullYear()
463
+ var m = objDate.getMonth() + 1
464
+ var d = objDate.getDate()
465
+ var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0,
466
+ 31)) / 86400000
467
+ for (i = 1900; i < 2101 && offset > 0; i++) {
468
+ temp = this.lYearDays(i)
469
+ offset -= temp
470
+ }
471
+ if (offset < 0) {
472
+ offset += temp;
473
+ i--
474
+ }
475
+
476
+ // 是否今天
477
+ var isTodayObj = new Date()
478
+ var isToday = false
479
+ if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
480
+ isToday = true
481
+ }
482
+ // 星期几
483
+ var nWeek = objDate.getDay()
484
+ var cWeek = this.nStr1[nWeek]
485
+ // 数字表示周几顺应天朝周一开始的惯例
486
+ if (nWeek == 0) {
487
+ nWeek = 7
488
+ }
489
+ // 农历年
490
+ var year = i
491
+ var leap = this.leapMonth(i) // 闰哪个月
492
+ var isLeap = false
493
+
494
+ // 效验闰月
495
+ for (i = 1; i < 13 && offset > 0; i++) {
496
+ // 闰月
497
+ if (leap > 0 && i == (leap + 1) && isLeap == false) {
498
+ --i
499
+ isLeap = true;
500
+ temp = this.leapDays(year) // 计算农历闰月天数
501
+ } else {
502
+ temp = this.monthDays(year, i) // 计算农历普通月天数
503
+ }
504
+ // 解除闰月
505
+ if (isLeap == true && i == (leap + 1)) {
506
+ isLeap = false
507
+ }
508
+ offset -= temp
509
+ }
510
+ // 闰月导致数组下标重叠取反
511
+ if (offset == 0 && leap > 0 && i == leap + 1) {
512
+ if (isLeap) {
513
+ isLeap = false
514
+ } else {
515
+ isLeap = true;
516
+ --i
517
+ }
518
+ }
519
+ if (offset < 0) {
520
+ offset += temp;
521
+ --i
522
+ }
523
+ // 农历月
524
+ var month = i
525
+ // 农历日
526
+ var day = offset + 1
527
+ // 天干地支处理
528
+ var sm = m - 1
529
+ var gzY = this.toGanZhiYear(year)
530
+
531
+ // 当月的两个节气
532
+ // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
533
+ var firstNode = this.getTerm(y, (m * 2 - 1)) // 返回当月「节」为几日开始
534
+ var secondNode = this.getTerm(y, (m * 2)) // 返回当月「节」为几日开始
535
+
536
+ // 依据12节气修正干支月
537
+ var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
538
+ if (d >= firstNode) {
539
+ gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
540
+ }
541
+
542
+ // 传入的日期的节气与否
543
+ var isTerm = false
544
+ var Term = null
545
+ if (firstNode == d) {
546
+ isTerm = true
547
+ Term = this.solarTerm[m * 2 - 2]
548
+ }
549
+ if (secondNode == d) {
550
+ isTerm = true
551
+ Term = this.solarTerm[m * 2 - 1]
552
+ }
553
+
554
+ // 计算农历日期
555
+ const IMonthCn = (isLeap ? '\u95f0' : '') + this.toChinaMonth(month)
556
+ // 农历日期的汉字表述法
557
+ let IDayCn = this.toChinaDay(day)
558
+
559
+ // 节日
560
+ let festival = '';
561
+ // 农历的月日汉字表述
562
+ let lMDcn = IMonthCn + IDayCn;
563
+ // 月份日期
564
+ let MD = m + '-' + d;
565
+ if (this.festivals.hasOwnProperty(lMDcn)) {
566
+ festival = this.festivals[lMDcn]
567
+ } else if(this.festivals.hasOwnProperty(MD)) {
568
+ festival = this.festivals[MD]
569
+ }
570
+
571
+ // 日柱 当月一日与 1900/1/1 相差天数
572
+ var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
573
+ var gzD = this.toGanZhi(dayCyclical + d - 1)
574
+ // 该日期所属的星座
575
+ var astro = this.toAstro(m, d)
576
+
577
+ return {
578
+ 'lYear': year,
579
+ 'lMonth': month,
580
+ 'lDay': day,
581
+ 'Animal': this.getAnimal(year),
582
+ 'IMonthCn': IMonthCn,
583
+ 'IDayCn': IDayCn,
584
+ 'cYear': y,
585
+ 'cMonth': m,
586
+ 'cDay': d,
587
+ 'gzYear': gzY,
588
+ 'gzMonth': gzM,
589
+ 'gzDay': gzD,
590
+ 'isToday': isToday,
591
+ 'isLeap': isLeap,
592
+ 'nWeek': nWeek,
593
+ 'ncWeek': '\u661f\u671f' + cWeek,
594
+ 'isTerm': isTerm,
595
+ 'Term': Term,
596
+ 'astro': astro,
597
+ 'festival': festival
598
+ }
599
+ },
600
+
601
+ /**
602
+ * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
603
+ * @param y lunar year
604
+ * @param m lunar month
605
+ * @param d lunar day
606
+ * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
607
+ * @return JSON object
608
+ * @eg:console.log(calendar.lunar2solar(1987,9,10));
609
+ */
610
+ lunar2solar: function(y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
611
+ var isLeapMonth = !!isLeapMonth
612
+ var leapOffset = 0
613
+ var leapMonth = this.leapMonth(y)
614
+ var leapDay = this.leapDays(y)
615
+ if (isLeapMonth && (leapMonth != m)) {
616
+ return -1
617
+ } // 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
618
+ if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) {
619
+ return -1
620
+ } // 超出了最大极限值
621
+ var day = this.monthDays(y, m)
622
+ var _day = day
623
+ // bugFix 2016-9-25
624
+ // if month is leap, _day use leapDays method
625
+ if (isLeapMonth) {
626
+ _day = this.leapDays(y, m)
627
+ }
628
+ if (y < 1900 || y > 2100 || d > _day) {
629
+ return -1
630
+ } // 参数合法性效验
631
+
632
+ // 计算农历的时间差
633
+ var offset = 0
634
+ for (var i = 1900; i < y; i++) {
635
+ offset += this.lYearDays(i)
636
+ }
637
+ var leap = 0;
638
+ var isAdd = false
639
+ for (var i = 1; i < m; i++) {
640
+ leap = this.leapMonth(y)
641
+ if (!isAdd) { // 处理闰月
642
+ if (leap <= i && leap > 0) {
643
+ offset += this.leapDays(y);
644
+ isAdd = true
645
+ }
646
+ }
647
+ offset += this.monthDays(y, i)
648
+ }
649
+ // 转换闰月农历 需补充该年闰月的前一个月的时差
650
+ if (isLeapMonth) {
651
+ offset += day
652
+ }
653
+ // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
654
+ var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
655
+ var calObj = new Date((offset + d - 31) * 86400000 + stmap)
656
+ var cY = calObj.getUTCFullYear()
657
+ var cM = calObj.getUTCMonth() + 1
658
+ var cD = calObj.getUTCDate()
659
+
660
+ return this.solar2lunar(cY, cM, cD)
661
+ }
662
+ }
663
+
664
+ export default calendar
@@ -0,0 +1,14 @@
1
+ {
2
+ "wu-calender.ok": "ok",
3
+ "wu-calender.cancel": "cancel",
4
+ "wu-calender.year": "year",
5
+ "wu-calender.month": "month",
6
+ "wu-calender.today": "today",
7
+ "wu-calender.MON": "MON",
8
+ "wu-calender.TUE": "TUE",
9
+ "wu-calender.WED": "WED",
10
+ "wu-calender.THU": "THU",
11
+ "wu-calender.FRI": "FRI",
12
+ "wu-calender.SAT": "SAT",
13
+ "wu-calender.SUN": "SUN"
14
+ }
@@ -0,0 +1,8 @@
1
+ import en from './en.json';
2
+ import zhHans from './zh-Hans.json';
3
+ import zhHant from './zh-Hant.json';
4
+ export default {
5
+ en,
6
+ 'zh-Hans': zhHans,
7
+ 'zh-Hant': zhHant
8
+ };