momentjs-rails 2.20.1 → 2.29.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/news.md +3 -0
  4. data/test/dummy/app/assets/config/manifest.js +1 -0
  5. data/test/dummy/config/environments/development.rb +2 -0
  6. data/test/dummy/config/environments/production.rb +1 -0
  7. data/test/dummy/config/environments/test.rb +2 -0
  8. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/-H/-H77gbOgi-dwHJoevs2PsAJBV-nde7DFDWBPXqUrMkw.cache +1 -0
  9. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/-y/-ypqz4WBYM3Qftk20RenhtH0iPKxdtyu6t3hVOjJLL4.cache +1 -0
  10. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1l/1l4oJ9T6GJ0pN-vGrH1QH9XT7AVF3Z9pakdHrxcsuXw.cache +1 -0
  11. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3T/3TjWGZFWBLAEGSW7kQIDJIL6_MukMwz_wLDMwgYsN1E.cache +2 -0
  12. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3e/3eGeoVsqjktkiAfNQ4zBuxtb0rtVWyQsKgjho5OHYnY.cache +2 -0
  13. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9C/9Cy8L_tqI8SvH-pVigMqBlPTus4vnZvt3YE2y8--beE.cache +1 -0
  14. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9z/9zOsSzS7x1TCGFnvxdjQdrEL2MENRZARP2fzL5JYLF0.cache +1 -0
  15. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/AP/AP7JoF1ZWY1lf5txW64EpzKJEzOIsR9Wkn_V0pl6Kzo.cache +0 -0
  16. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Bu/BuxnmLYpqxwN3qck74Nh3Adaqz5VwdArL7wCZx6TnII.cache +2 -0
  17. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/JO/JO9QyaKhLUs4VF1ODPXLiqcSziQS4x3sudms-3GYjww.cache +1 -0
  18. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Mn/MnWwrzXFar6jFGAfp8PS_cZXjeFYCA85xsTQT758958.cache +0 -0
  19. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/OM/OM7fRuvTUPQcZERsO6Tsv0fvTdZqsRZbN-mYK00TwnI.cache +1 -0
  20. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Pn/PnNlsrskw8SKHpOLkqJgEN_HjZzB2jsQZauj-dnQQ2A.cache +0 -0
  21. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Rf/RfFWq_tyttbS2wyfSc0kKvcSxUeC_m01sL3Dl6EWEqM.cache +0 -0
  22. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Ru/RuQ9HENefRmSoZaLfw7LalsxdBHpKJMyc2c3OQ_kQr8.cache +3 -0
  23. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/T-/T-9_ffpUxh6GAYTAzM3sF5lykyt9GVpcbKZaRXxw0wA.cache +2 -0
  24. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Zj/Zjn9OiwGREdMXvLZA-tY289lQslnn7R3BrSwhsntMWQ.cache +3 -0
  25. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Zm/Zmp1hSfJjOVQBTRXZ-xSs8qqIK6lmyQ4GK_uYVsDVJc.cache +1 -0
  26. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/bR/bRSmDUPNI--mMuAgRHWf1r56iydNwHRg_wniS8HqhNg.cache +0 -0
  27. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/dA/dAAcqCClwz0OKgpbEd9G3OUYKW1TeNqJV49Zxh2bQ5A.cache +1 -0
  28. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/dh/dhlLaVScr1-Ty5UFcg6xdU4xSWIuySWzjcC5OU2mOf4.cache +0 -0
  29. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/gt/gtu4KqwPpmom4hwtRz9x180bzJzATR6V8hyE3uHsyas.cache +3 -0
  30. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/kl/klJHIoyRhrimisvwpjAPKxae89riL_0exIgpv4u3u5Y.cache +0 -0
  31. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/m1/m16f5eEXdsOfzbCB88BS3eojIypOTYQjyyv5kkTDwxY.cache +1 -0
  32. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/mm/mmqv3-gEoPWhMrVamMnpI1csCNLKpv-qVQgHERXQNaU.cache +2 -0
  33. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/rp/rpqm2QeVJPWIySovDg4XdCnI6X5_FXCd0pZhuOnwAfk.cache +1 -0
  34. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/wx/wxFkskdA6iSIVZxka368Y8wkP-3edr2nlW4VSOI6GhY.cache +3 -0
  35. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xP/xPbdGyTHlpGRgIS0gbG9suCByeakXeTFaQ1B_h3_aUI.cache +0 -0
  36. data/test/integration/navigation_test.rb +1 -1
  37. data/vendor/assets/javascripts/moment/af.js +51 -54
  38. data/vendor/assets/javascripts/moment/ar-dz.js +150 -54
  39. data/vendor/assets/javascripts/moment/ar-kw.js +40 -46
  40. data/vendor/assets/javascripts/moment/ar-ly.js +141 -97
  41. data/vendor/assets/javascripts/moment/ar-ma.js +40 -46
  42. data/vendor/assets/javascripts/moment/ar-sa.js +75 -77
  43. data/vendor/assets/javascripts/moment/ar-tn.js +15 -21
  44. data/vendor/assets/javascripts/moment/ar.js +158 -112
  45. data/vendor/assets/javascripts/moment/az.js +52 -57
  46. data/vendor/assets/javascripts/moment/be.js +69 -63
  47. data/vendor/assets/javascripts/moment/bg.js +49 -53
  48. data/vendor/assets/javascripts/moment/bm.js +43 -51
  49. data/vendor/assets/javascripts/moment/bn-bd.js +128 -0
  50. data/vendor/assets/javascripts/moment/bn.js +76 -78
  51. data/vendor/assets/javascripts/moment/bo.js +80 -78
  52. data/vendor/assets/javascripts/moment/br.js +115 -59
  53. data/vendor/assets/javascripts/moment/bs.js +48 -52
  54. data/vendor/assets/javascripts/moment/ca.js +76 -68
  55. data/vendor/assets/javascripts/moment/cs.js +80 -89
  56. data/vendor/assets/javascripts/moment/cv.js +45 -47
  57. data/vendor/assets/javascripts/moment/cy.js +41 -26
  58. data/vendor/assets/javascripts/moment/da.js +43 -51
  59. data/vendor/assets/javascripts/moment/de-at.js +53 -54
  60. data/vendor/assets/javascripts/moment/de-ch.js +54 -55
  61. data/vendor/assets/javascripts/moment/de.js +53 -54
  62. data/vendor/assets/javascripts/moment/dv.js +64 -75
  63. data/vendor/assets/javascripts/moment/el.js +63 -60
  64. data/vendor/assets/javascripts/moment/en-au.js +55 -55
  65. data/vendor/assets/javascripts/moment/en-ca.js +52 -52
  66. data/vendor/assets/javascripts/moment/en-gb.js +55 -55
  67. data/vendor/assets/javascripts/moment/en-ie.js +55 -55
  68. data/vendor/assets/javascripts/moment/en-il.js +64 -0
  69. data/vendor/assets/javascripts/moment/en-in.js +68 -0
  70. data/vendor/assets/javascripts/moment/en-nz.js +55 -55
  71. data/vendor/assets/javascripts/moment/en-sg.js +68 -0
  72. data/vendor/assets/javascripts/moment/eo.js +46 -52
  73. data/vendor/assets/javascripts/moment/es-do.js +75 -63
  74. data/vendor/assets/javascripts/moment/es-mx.js +106 -0
  75. data/vendor/assets/javascripts/moment/es-us.js +83 -61
  76. data/vendor/assets/javascripts/moment/es.js +83 -70
  77. data/vendor/assets/javascripts/moment/et.js +58 -62
  78. data/vendor/assets/javascripts/moment/eu.js +53 -57
  79. data/vendor/assets/javascripts/moment/fa.js +84 -82
  80. data/vendor/assets/javascripts/moment/fi.js +72 -61
  81. data/vendor/assets/javascripts/moment/fil.js +58 -0
  82. data/vendor/assets/javascripts/moment/fo.js +46 -51
  83. data/vendor/assets/javascripts/moment/fr-ca.js +44 -50
  84. data/vendor/assets/javascripts/moment/fr-ch.js +47 -53
  85. data/vendor/assets/javascripts/moment/fr.js +72 -52
  86. data/vendor/assets/javascripts/moment/fy.js +52 -51
  87. data/vendor/assets/javascripts/moment/ga.js +95 -0
  88. data/vendor/assets/javascripts/moment/gd.js +81 -63
  89. data/vendor/assets/javascripts/moment/gl.js +54 -58
  90. data/vendor/assets/javascripts/moment/gom-deva.js +124 -0
  91. data/vendor/assets/javascripts/moment/gom-latn.js +70 -70
  92. data/vendor/assets/javascripts/moment/gu.js +30 -34
  93. data/vendor/assets/javascripts/moment/he.js +48 -54
  94. data/vendor/assets/javascripts/moment/hi.js +115 -76
  95. data/vendor/assets/javascripts/moment/hr.js +54 -55
  96. data/vendor/assets/javascripts/moment/hu.js +63 -56
  97. data/vendor/assets/javascripts/moment/hy-am.js +44 -48
  98. data/vendor/assets/javascripts/moment/id.js +44 -52
  99. data/vendor/assets/javascripts/moment/is.js +61 -55
  100. data/vendor/assets/javascripts/moment/it-ch.js +64 -0
  101. data/vendor/assets/javascripts/moment/it.js +89 -54
  102. data/vendor/assets/javascripts/moment/ja.js +122 -55
  103. data/vendor/assets/javascripts/moment/jv.js +44 -52
  104. data/vendor/assets/javascripts/moment/ka.js +68 -66
  105. data/vendor/assets/javascripts/moment/kk.js +46 -52
  106. data/vendor/assets/javascripts/moment/km.js +64 -21
  107. data/vendor/assets/javascripts/moment/kn.js +72 -76
  108. data/vendor/assets/javascripts/moment/ko.js +48 -56
  109. data/vendor/assets/javascripts/moment/ku.js +118 -0
  110. data/vendor/assets/javascripts/moment/ky.js +48 -53
  111. data/vendor/assets/javascripts/moment/lb.js +39 -42
  112. data/vendor/assets/javascripts/moment/lo.js +44 -50
  113. data/vendor/assets/javascripts/moment/lt.js +79 -75
  114. data/vendor/assets/javascripts/moment/lv.js +57 -63
  115. data/vendor/assets/javascripts/moment/me.js +53 -48
  116. data/vendor/assets/javascripts/moment/mi.js +15 -21
  117. data/vendor/assets/javascripts/moment/mk.js +46 -52
  118. data/vendor/assets/javascripts/moment/ml.js +51 -53
  119. data/vendor/assets/javascripts/moment/mn.js +99 -0
  120. data/vendor/assets/javascripts/moment/mr.js +140 -100
  121. data/vendor/assets/javascripts/moment/ms-my.js +43 -51
  122. data/vendor/assets/javascripts/moment/ms.js +43 -51
  123. data/vendor/assets/javascripts/moment/mt.js +45 -51
  124. data/vendor/assets/javascripts/moment/my.js +37 -43
  125. data/vendor/assets/javascripts/moment/nb.js +45 -48
  126. data/vendor/assets/javascripts/moment/ne.js +73 -77
  127. data/vendor/assets/javascripts/moment/nl-be.js +70 -57
  128. data/vendor/assets/javascripts/moment/nl.js +72 -57
  129. data/vendor/assets/javascripts/moment/nn.js +46 -47
  130. data/vendor/assets/javascripts/moment/oc-lnc.js +83 -0
  131. data/vendor/assets/javascripts/moment/pa-in.js +72 -76
  132. data/vendor/assets/javascripts/moment/pl.js +67 -55
  133. data/vendor/assets/javascripts/moment/pt-br.js +41 -46
  134. data/vendor/assets/javascripts/moment/pt.js +46 -50
  135. data/vendor/assets/javascripts/moment/ro.js +49 -51
  136. data/vendor/assets/javascripts/moment/ru.js +104 -83
  137. data/vendor/assets/javascripts/moment/sd.js +56 -74
  138. data/vendor/assets/javascripts/moment/se.js +41 -46
  139. data/vendor/assets/javascripts/moment/si.js +48 -52
  140. data/vendor/assets/javascripts/moment/sk.js +52 -66
  141. data/vendor/assets/javascripts/moment/sl.js +50 -54
  142. data/vendor/assets/javascripts/moment/sq.js +47 -53
  143. data/vendor/assets/javascripts/moment/sr-cyrl.js +53 -49
  144. data/vendor/assets/javascripts/moment/sr.js +56 -50
  145. data/vendor/assets/javascripts/moment/ss.js +48 -55
  146. data/vendor/assets/javascripts/moment/sv.js +51 -53
  147. data/vendor/assets/javascripts/moment/sw.js +45 -51
  148. data/vendor/assets/javascripts/moment/ta.js +75 -77
  149. data/vendor/assets/javascripts/moment/te.js +51 -55
  150. data/vendor/assets/javascripts/moment/tet.js +49 -50
  151. data/vendor/assets/javascripts/moment/tg.js +116 -0
  152. data/vendor/assets/javascripts/moment/th.js +45 -49
  153. data/vendor/assets/javascripts/moment/tk.js +91 -0
  154. data/vendor/assets/javascripts/moment/tl-ph.js +40 -46
  155. data/vendor/assets/javascripts/moment/tlh.js +69 -67
  156. data/vendor/assets/javascripts/moment/tr.js +91 -76
  157. data/vendor/assets/javascripts/moment/tzl.js +65 -69
  158. data/vendor/assets/javascripts/moment/tzm-latn.js +39 -45
  159. data/vendor/assets/javascripts/moment/tzm.js +38 -44
  160. data/vendor/assets/javascripts/moment/ug-cn.js +110 -0
  161. data/vendor/assets/javascripts/moment/uk.js +78 -68
  162. data/vendor/assets/javascripts/moment/ur.js +56 -74
  163. data/vendor/assets/javascripts/moment/uz-latn.js +44 -50
  164. data/vendor/assets/javascripts/moment/uz.js +42 -50
  165. data/vendor/assets/javascripts/moment/vi.js +54 -55
  166. data/vendor/assets/javascripts/moment/x-pseudo.js +58 -56
  167. data/vendor/assets/javascripts/moment/yo.js +44 -52
  168. data/vendor/assets/javascripts/moment/zh-cn.js +66 -58
  169. data/vendor/assets/javascripts/moment/zh-hk.js +58 -63
  170. data/vendor/assets/javascripts/moment/zh-mo.js +100 -0
  171. data/vendor/assets/javascripts/moment/zh-tw.js +55 -61
  172. data/vendor/assets/javascripts/moment.js +2673 -1546
  173. metadata +92 -31
  174. data/test/dummy/tmp/cache/assets/D1C/680/sprockets%2F16ed4d5afdb2919596e6f8790e2116c2 +0 -0
  175. data/test/dummy/tmp/cache/assets/D35/CA0/sprockets%2F493e64bce2d302801dc01cf7cd096a58 +0 -0
  176. data/test/dummy/tmp/cache/assets/D3F/5F0/sprockets%2F4a6c53eae7c6e41a69a191578bbb6417 +0 -0
  177. data/test/dummy/tmp/cache/assets/D58/BD0/sprockets%2F4de9ddc9b725c715a54c98697b2528fe +0 -0
  178. data/test/dummy/tmp/cache/assets/D75/510/sprockets%2Fe690787ac522f47a6be024bfcc1767ee +0 -0
  179. data/test/dummy/tmp/cache/assets/E10/250/sprockets%2Fe4badb9ddfda484eb9671bf88567be61 +0 -0
@@ -3,35 +3,34 @@
3
3
  //! author : Ben : https://github.com/ben-lin
4
4
  //! author : Chris Lam : https://github.com/hehachris
5
5
  //! author : Konstantin : https://github.com/skfd
6
+ //! author : Anthony : https://github.com/anthonylau
6
7
 
7
- ;(function (global, factory) {
8
- typeof exports === 'object' && typeof module !== 'undefined'
9
- && typeof require === 'function' ? factory(require('../moment')) :
10
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
11
- factory(global.moment)
12
- }(this, (function (moment) { 'use strict';
8
+ import moment from '../moment';
13
9
 
14
-
15
- var zhHk = moment.defineLocale('zh-hk', {
16
- months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
17
- monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
18
- weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
19
- weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
20
- weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
21
- longDateFormat : {
22
- LT : 'HH:mm',
23
- LTS : 'HH:mm:ss',
24
- L : 'YYYY/MM/DD',
25
- LL : 'YYYY年M月D日',
26
- LLL : 'YYYY年M月D日 HH:mm',
27
- LLLL : 'YYYY年M月D日dddd HH:mm',
28
- l : 'YYYY/M/D',
29
- ll : 'YYYY年M月D日',
30
- lll : 'YYYY年M月D日 HH:mm',
31
- llll : 'YYYYMD日dddd HH:mm'
10
+ export default moment.defineLocale('zh-hk', {
11
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
12
+ '_'
13
+ ),
14
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
15
+ '_'
16
+ ),
17
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
18
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
19
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
20
+ longDateFormat: {
21
+ LT: 'HH:mm',
22
+ LTS: 'HH:mm:ss',
23
+ L: 'YYYY/MM/DD',
24
+ LL: 'YYYYMD',
25
+ LLL: 'YYYY年M月D日 HH:mm',
26
+ LLLL: 'YYYY年M月D日dddd HH:mm',
27
+ l: 'YYYY/M/D',
28
+ ll: 'YYYY年M月D日',
29
+ lll: 'YYYY年M月D日 HH:mm',
30
+ llll: 'YYYY年M月D日dddd HH:mm',
32
31
  },
33
32
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
34
- meridiemHour : function (hour, meridiem) {
33
+ meridiemHour: function (hour, meridiem) {
35
34
  if (hour === 12) {
36
35
  hour = 0;
37
36
  }
@@ -43,15 +42,15 @@ var zhHk = moment.defineLocale('zh-hk', {
43
42
  return hour + 12;
44
43
  }
45
44
  },
46
- meridiem : function (hour, minute, isLower) {
45
+ meridiem: function (hour, minute, isLower) {
47
46
  var hm = hour * 100 + minute;
48
47
  if (hm < 600) {
49
48
  return '凌晨';
50
49
  } else if (hm < 900) {
51
50
  return '早上';
52
- } else if (hm < 1130) {
51
+ } else if (hm < 1200) {
53
52
  return '上午';
54
- } else if (hm < 1230) {
53
+ } else if (hm === 1200) {
55
54
  return '中午';
56
55
  } else if (hm < 1800) {
57
56
  return '下午';
@@ -59,48 +58,44 @@ var zhHk = moment.defineLocale('zh-hk', {
59
58
  return '晚上';
60
59
  }
61
60
  },
62
- calendar : {
63
- sameDay : '[今天]LT',
64
- nextDay : '[明天]LT',
65
- nextWeek : '[下]ddddLT',
66
- lastDay : '[昨天]LT',
67
- lastWeek : '[上]ddddLT',
68
- sameElse : 'L'
61
+ calendar: {
62
+ sameDay: '[今天]LT',
63
+ nextDay: '[明天]LT',
64
+ nextWeek: '[下]ddddLT',
65
+ lastDay: '[昨天]LT',
66
+ lastWeek: '[上]ddddLT',
67
+ sameElse: 'L',
69
68
  },
70
69
  dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
71
- ordinal : function (number, period) {
70
+ ordinal: function (number, period) {
72
71
  switch (period) {
73
- case 'd' :
74
- case 'D' :
75
- case 'DDD' :
72
+ case 'd':
73
+ case 'D':
74
+ case 'DDD':
76
75
  return number + '日';
77
- case 'M' :
76
+ case 'M':
78
77
  return number + '月';
79
- case 'w' :
80
- case 'W' :
78
+ case 'w':
79
+ case 'W':
81
80
  return number + '週';
82
- default :
81
+ default:
83
82
  return number;
84
83
  }
85
84
  },
86
- relativeTime : {
87
- future : '%s',
88
- past : '%s前',
89
- s : '幾秒',
90
- ss : '%d 秒',
91
- m : '1 分鐘',
92
- mm : '%d 分鐘',
93
- h : '1 小時',
94
- hh : '%d 小時',
95
- d : '1 天',
96
- dd : '%d 天',
97
- M : '1 個月',
98
- MM : '%d 個月',
99
- y : '1 年',
100
- yy : '%d 年'
101
- }
85
+ relativeTime: {
86
+ future: '%s',
87
+ past: '%s前',
88
+ s: '幾秒',
89
+ ss: '%d 秒',
90
+ m: '1 分鐘',
91
+ mm: '%d 分鐘',
92
+ h: '1 小時',
93
+ hh: '%d 小時',
94
+ d: '1 天',
95
+ dd: '%d 天',
96
+ M: '1 個月',
97
+ MM: '%d 個月',
98
+ y: '1 年',
99
+ yy: '%d 年',
100
+ },
102
101
  });
103
-
104
- return zhHk;
105
-
106
- })));
@@ -0,0 +1,100 @@
1
+ //! moment.js locale configuration
2
+ //! locale : Chinese (Macau) [zh-mo]
3
+ //! author : Ben : https://github.com/ben-lin
4
+ //! author : Chris Lam : https://github.com/hehachris
5
+ //! author : Tan Yuanhong : https://github.com/le0tan
6
+
7
+ import moment from '../moment';
8
+
9
+ export default moment.defineLocale('zh-mo', {
10
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
11
+ '_'
12
+ ),
13
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
14
+ '_'
15
+ ),
16
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
17
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
18
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
19
+ longDateFormat: {
20
+ LT: 'HH:mm',
21
+ LTS: 'HH:mm:ss',
22
+ L: 'DD/MM/YYYY',
23
+ LL: 'YYYY年M月D日',
24
+ LLL: 'YYYY年M月D日 HH:mm',
25
+ LLLL: 'YYYY年M月D日dddd HH:mm',
26
+ l: 'D/M/YYYY',
27
+ ll: 'YYYY年M月D日',
28
+ lll: 'YYYY年M月D日 HH:mm',
29
+ llll: 'YYYY年M月D日dddd HH:mm',
30
+ },
31
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
32
+ meridiemHour: function (hour, meridiem) {
33
+ if (hour === 12) {
34
+ hour = 0;
35
+ }
36
+ if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
37
+ return hour;
38
+ } else if (meridiem === '中午') {
39
+ return hour >= 11 ? hour : hour + 12;
40
+ } else if (meridiem === '下午' || meridiem === '晚上') {
41
+ return hour + 12;
42
+ }
43
+ },
44
+ meridiem: function (hour, minute, isLower) {
45
+ var hm = hour * 100 + minute;
46
+ if (hm < 600) {
47
+ return '凌晨';
48
+ } else if (hm < 900) {
49
+ return '早上';
50
+ } else if (hm < 1130) {
51
+ return '上午';
52
+ } else if (hm < 1230) {
53
+ return '中午';
54
+ } else if (hm < 1800) {
55
+ return '下午';
56
+ } else {
57
+ return '晚上';
58
+ }
59
+ },
60
+ calendar: {
61
+ sameDay: '[今天] LT',
62
+ nextDay: '[明天] LT',
63
+ nextWeek: '[下]dddd LT',
64
+ lastDay: '[昨天] LT',
65
+ lastWeek: '[上]dddd LT',
66
+ sameElse: 'L',
67
+ },
68
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
69
+ ordinal: function (number, period) {
70
+ switch (period) {
71
+ case 'd':
72
+ case 'D':
73
+ case 'DDD':
74
+ return number + '日';
75
+ case 'M':
76
+ return number + '月';
77
+ case 'w':
78
+ case 'W':
79
+ return number + '週';
80
+ default:
81
+ return number;
82
+ }
83
+ },
84
+ relativeTime: {
85
+ future: '%s內',
86
+ past: '%s前',
87
+ s: '幾秒',
88
+ ss: '%d 秒',
89
+ m: '1 分鐘',
90
+ mm: '%d 分鐘',
91
+ h: '1 小時',
92
+ hh: '%d 小時',
93
+ d: '1 天',
94
+ dd: '%d 天',
95
+ M: '1 個月',
96
+ MM: '%d 個月',
97
+ y: '1 年',
98
+ yy: '%d 年',
99
+ },
100
+ });
@@ -3,34 +3,32 @@
3
3
  //! author : Ben : https://github.com/ben-lin
4
4
  //! author : Chris Lam : https://github.com/hehachris
5
5
 
6
- ;(function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined'
8
- && typeof require === 'function' ? factory(require('../moment')) :
9
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
10
- factory(global.moment)
11
- }(this, (function (moment) { 'use strict';
6
+ import moment from '../moment';
12
7
 
13
-
14
- var zhTw = moment.defineLocale('zh-tw', {
15
- months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
16
- monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
17
- weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
18
- weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
19
- weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
20
- longDateFormat : {
21
- LT : 'HH:mm',
22
- LTS : 'HH:mm:ss',
23
- L : 'YYYY/MM/DD',
24
- LL : 'YYYY年M月D日',
25
- LLL : 'YYYY年M月D日 HH:mm',
26
- LLLL : 'YYYY年M月D日dddd HH:mm',
27
- l : 'YYYY/M/D',
28
- ll : 'YYYY年M月D日',
29
- lll : 'YYYY年M月D日 HH:mm',
30
- llll : 'YYYYMD日dddd HH:mm'
8
+ export default moment.defineLocale('zh-tw', {
9
+ months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
10
+ '_'
11
+ ),
12
+ monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
13
+ '_'
14
+ ),
15
+ weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
16
+ weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
17
+ weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
18
+ longDateFormat: {
19
+ LT: 'HH:mm',
20
+ LTS: 'HH:mm:ss',
21
+ L: 'YYYY/MM/DD',
22
+ LL: 'YYYYMD',
23
+ LLL: 'YYYY年M月D日 HH:mm',
24
+ LLLL: 'YYYY年M月D日dddd HH:mm',
25
+ l: 'YYYY/M/D',
26
+ ll: 'YYYY年M月D日',
27
+ lll: 'YYYY年M月D日 HH:mm',
28
+ llll: 'YYYY年M月D日dddd HH:mm',
31
29
  },
32
30
  meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
33
- meridiemHour : function (hour, meridiem) {
31
+ meridiemHour: function (hour, meridiem) {
34
32
  if (hour === 12) {
35
33
  hour = 0;
36
34
  }
@@ -42,7 +40,7 @@ var zhTw = moment.defineLocale('zh-tw', {
42
40
  return hour + 12;
43
41
  }
44
42
  },
45
- meridiem : function (hour, minute, isLower) {
43
+ meridiem: function (hour, minute, isLower) {
46
44
  var hm = hour * 100 + minute;
47
45
  if (hm < 600) {
48
46
  return '凌晨';
@@ -58,48 +56,44 @@ var zhTw = moment.defineLocale('zh-tw', {
58
56
  return '晚上';
59
57
  }
60
58
  },
61
- calendar : {
62
- sameDay : '[今天]LT',
63
- nextDay : '[明天]LT',
64
- nextWeek : '[下]ddddLT',
65
- lastDay : '[昨天]LT',
66
- lastWeek : '[上]ddddLT',
67
- sameElse : 'L'
59
+ calendar: {
60
+ sameDay: '[今天] LT',
61
+ nextDay: '[明天] LT',
62
+ nextWeek: '[下]dddd LT',
63
+ lastDay: '[昨天] LT',
64
+ lastWeek: '[上]dddd LT',
65
+ sameElse: 'L',
68
66
  },
69
67
  dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
70
- ordinal : function (number, period) {
68
+ ordinal: function (number, period) {
71
69
  switch (period) {
72
- case 'd' :
73
- case 'D' :
74
- case 'DDD' :
70
+ case 'd':
71
+ case 'D':
72
+ case 'DDD':
75
73
  return number + '日';
76
- case 'M' :
74
+ case 'M':
77
75
  return number + '月';
78
- case 'w' :
79
- case 'W' :
76
+ case 'w':
77
+ case 'W':
80
78
  return number + '週';
81
- default :
79
+ default:
82
80
  return number;
83
81
  }
84
82
  },
85
- relativeTime : {
86
- future : '%s',
87
- past : '%s前',
88
- s : '幾秒',
89
- ss : '%d 秒',
90
- m : '1 分鐘',
91
- mm : '%d 分鐘',
92
- h : '1 小時',
93
- hh : '%d 小時',
94
- d : '1 天',
95
- dd : '%d 天',
96
- M : '1 個月',
97
- MM : '%d 個月',
98
- y : '1 年',
99
- yy : '%d 年'
100
- }
83
+ relativeTime: {
84
+ future: '%s',
85
+ past: '%s前',
86
+ s: '幾秒',
87
+ ss: '%d 秒',
88
+ m: '1 分鐘',
89
+ mm: '%d 分鐘',
90
+ h: '1 小時',
91
+ hh: '%d 小時',
92
+ d: '1 天',
93
+ dd: '%d 天',
94
+ M: '1 個月',
95
+ MM: '%d 個月',
96
+ y: '1 年',
97
+ yy: '%d 年',
98
+ },
101
99
  });
102
-
103
- return zhTw;
104
-
105
- })));