momentjs-rails 2.29.1.1 → 2.29.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/news.md +3 -0
  4. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/0t/0ty_fqRlzF-hGYQebubBsuGgCeT9YnqkULkaCu1nwMk.cache +0 -0
  5. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/{3T/3TjWGZFWBLAEGSW7kQIDJIL6_MukMwz_wLDMwgYsN1E.cache → 3D/3DLOuccQFCZCWz_kmyP6PagEyQM5ne4ONIzBwdwG-fY.cache} +0 -0
  6. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3h/3hk-k7Z5qoOh6S1dyiOjpfiwRfblMf4NpG3NVkO_4GQ.cache +1 -0
  7. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/{9C/9Cy8L_tqI8SvH-pVigMqBlPTus4vnZvt3YE2y8--beE.cache → 81/81FXcACo3ySybaa-2mJ9JsZ4xXvXxgi6rAT9sildrVs.cache} +1 -1
  8. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/{JO/JO9QyaKhLUs4VF1ODPXLiqcSziQS4x3sudms-3GYjww.cache → 97/97gKfWGwqo7IhT-5nqdT3p547QEt2G9nbmU5XVAtEeE.cache} +1 -1
  9. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/GO/GOYA_gO9tZqOtwNUptOfYUG1F6q5BF1ZZI0Wr7itvYM.cache +1 -0
  10. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/NG/NGyfZ_kRU3oHnf8bEjRHJwpjyx0NF_U8V_ENdenCoIg.cache +1 -0
  11. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/{3e/3eGeoVsqjktkiAfNQ4zBuxtb0rtVWyQsKgjho5OHYnY.cache → R9/R9pPKpyMZFVnjZL7kwY21faYzV2WpIx_hPb5GrUown8.cache} +0 -0
  12. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/{MY/MYzGrw0IXUX2kX7p7ewfG8d7UsRV5X17R5hdQq8CTZI.cache → W1/W1cCnSuixTbIt3rgc5Z-4BGC1iBfw6gqKVjuOh66lSY.cache} +0 -0
  13. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Xr/Xr9AioDZNswMqHmbREXo4J_kNVPlbysC8G37BX65-rY.cache +0 -0
  14. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/lK/lKG81FVPPHkSni295teRgLDoWVYRamY_BCSFxMiagSs.cache +1 -0
  15. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/q7/q7CVcZSJHIEQqdPLpSAb4YHepJZFY541_7ToMaHvbtA.cache +0 -0
  16. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/{8Z/8ZS9j7aGFdwDIFga-3KoPCkVogPmZ-NekN5uBOSE5QU.cache → wF/wFKYFOm2u1A3crk6JyBKUw2L5ybvI0Tbt2jPPZXfdWQ.cache} +0 -0
  17. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/yY/yY97dYnGEDUjVioT9bUJucvTt0w_ToimRXWj3YYvD10.cache +0 -0
  18. data/test/integration/navigation_test.rb +1 -1
  19. data/vendor/assets/javascripts/moment/af.js +66 -77
  20. data/vendor/assets/javascripts/moment/ar-dz.js +145 -156
  21. data/vendor/assets/javascripts/moment/ar-kw.js +48 -58
  22. data/vendor/assets/javascripts/moment/ar-ly.js +165 -176
  23. data/vendor/assets/javascripts/moment/ar-ma.js +48 -58
  24. data/vendor/assets/javascripts/moment/ar-sa.js +97 -107
  25. data/vendor/assets/javascripts/moment/ar-tn.js +48 -58
  26. data/vendor/assets/javascripts/moment/ar.js +180 -191
  27. data/vendor/assets/javascripts/moment/az.js +94 -104
  28. data/vendor/assets/javascripts/moment/be.js +124 -134
  29. data/vendor/assets/javascripts/moment/bg.js +80 -91
  30. data/vendor/assets/javascripts/moment/bm.js +47 -57
  31. data/vendor/assets/javascripts/moment/bn-bd.js +119 -129
  32. data/vendor/assets/javascripts/moment/bn.js +111 -121
  33. data/vendor/assets/javascripts/moment/bo.js +114 -123
  34. data/vendor/assets/javascripts/moment/br.js +154 -162
  35. data/vendor/assets/javascripts/moment/bs.js +138 -148
  36. data/vendor/assets/javascripts/moment/ca.js +84 -92
  37. data/vendor/assets/javascripts/moment/cs.js +168 -170
  38. data/vendor/assets/javascripts/moment/cv.js +55 -65
  39. data/vendor/assets/javascripts/moment/cy.js +89 -99
  40. data/vendor/assets/javascripts/moment/da.js +48 -59
  41. data/vendor/assets/javascripts/moment/de-at.js +68 -79
  42. data/vendor/assets/javascripts/moment/de-ch.js +69 -78
  43. data/vendor/assets/javascripts/moment/de.js +68 -79
  44. data/vendor/assets/javascripts/moment/dv.js +84 -95
  45. data/vendor/assets/javascripts/moment/el.js +94 -103
  46. data/vendor/assets/javascripts/moment/en-au.js +63 -74
  47. data/vendor/assets/javascripts/moment/en-ca.js +59 -70
  48. data/vendor/assets/javascripts/moment/en-gb.js +63 -74
  49. data/vendor/assets/javascripts/moment/en-ie.js +63 -74
  50. data/vendor/assets/javascripts/moment/en-il.js +59 -70
  51. data/vendor/assets/javascripts/moment/en-in.js +63 -74
  52. data/vendor/assets/javascripts/moment/en-nz.js +63 -74
  53. data/vendor/assets/javascripts/moment/en-sg.js +63 -74
  54. data/vendor/assets/javascripts/moment/eo.js +60 -71
  55. data/vendor/assets/javascripts/moment/es-do.js +96 -103
  56. data/vendor/assets/javascripts/moment/es-mx.js +97 -104
  57. data/vendor/assets/javascripts/moment/es-us.js +96 -103
  58. data/vendor/assets/javascripts/moment/es.js +97 -104
  59. data/vendor/assets/javascripts/moment/et.js +68 -79
  60. data/vendor/assets/javascripts/moment/eu.js +56 -65
  61. data/vendor/assets/javascripts/moment/fa.js +101 -109
  62. data/vendor/assets/javascripts/moment/fi.js +111 -119
  63. data/vendor/assets/javascripts/moment/fil.js +52 -63
  64. data/vendor/assets/javascripts/moment/fo.js +49 -59
  65. data/vendor/assets/javascripts/moment/fr-ca.js +62 -72
  66. data/vendor/assets/javascripts/moment/fr-ch.js +66 -76
  67. data/vendor/assets/javascripts/moment/fr.js +98 -105
  68. data/vendor/assets/javascripts/moment/fy.js +68 -81
  69. data/vendor/assets/javascripts/moment/ga.js +89 -100
  70. data/vendor/assets/javascripts/moment/gd.js +89 -100
  71. data/vendor/assets/javascripts/moment/gl.js +64 -74
  72. data/vendor/assets/javascripts/moment/gom-deva.js +116 -125
  73. data/vendor/assets/javascripts/moment/gom-latn.js +114 -125
  74. data/vendor/assets/javascripts/moment/gu.js +114 -124
  75. data/vendor/assets/javascripts/moment/he.js +82 -93
  76. data/vendor/assets/javascripts/moment/hi.js +154 -161
  77. data/vendor/assets/javascripts/moment/hr.js +143 -152
  78. data/vendor/assets/javascripts/moment/hu.js +106 -117
  79. data/vendor/assets/javascripts/moment/hy-am.js +83 -92
  80. data/vendor/assets/javascripts/moment/id.js +70 -81
  81. data/vendor/assets/javascripts/moment/is.js +125 -135
  82. data/vendor/assets/javascripts/moment/it-ch.js +57 -68
  83. data/vendor/assets/javascripts/moment/it.js +95 -106
  84. data/vendor/assets/javascripts/moment/ja.js +135 -146
  85. data/vendor/assets/javascripts/moment/jv.js +70 -81
  86. data/vendor/assets/javascripts/moment/ka.js +79 -90
  87. data/vendor/assets/javascripts/moment/kk.js +76 -87
  88. data/vendor/assets/javascripts/moment/km.js +95 -105
  89. data/vendor/assets/javascripts/moment/kn.js +116 -126
  90. data/vendor/assets/javascripts/moment/ko.js +69 -80
  91. data/vendor/assets/javascripts/moment/ku.js +110 -121
  92. data/vendor/assets/javascripts/moment/ky.js +78 -89
  93. data/vendor/assets/javascripts/moment/lb.js +119 -128
  94. data/vendor/assets/javascripts/moment/lo.js +59 -69
  95. data/vendor/assets/javascripts/moment/lt.js +112 -121
  96. data/vendor/assets/javascripts/moment/lv.js +84 -94
  97. data/vendor/assets/javascripts/moment/me.js +108 -120
  98. data/vendor/assets/javascripts/moment/mi.js +53 -63
  99. data/vendor/assets/javascripts/moment/mk.js +78 -90
  100. data/vendor/assets/javascripts/moment/ml.js +73 -82
  101. data/vendor/assets/javascripts/moment/mn.js +90 -100
  102. data/vendor/assets/javascripts/moment/mr.js +191 -201
  103. data/vendor/assets/javascripts/moment/ms-my.js +70 -81
  104. data/vendor/assets/javascripts/moment/ms.js +70 -81
  105. data/vendor/assets/javascripts/moment/mt.js +49 -59
  106. data/vendor/assets/javascripts/moment/my.js +82 -93
  107. data/vendor/assets/javascripts/moment/nb.js +53 -65
  108. data/vendor/assets/javascripts/moment/ne.js +113 -123
  109. data/vendor/assets/javascripts/moment/nl-be.js +92 -103
  110. data/vendor/assets/javascripts/moment/nl.js +94 -105
  111. data/vendor/assets/javascripts/moment/nn.js +53 -65
  112. data/vendor/assets/javascripts/moment/oc-lnc.js +74 -83
  113. data/vendor/assets/javascripts/moment/pa-in.js +114 -124
  114. data/vendor/assets/javascripts/moment/pl.js +123 -133
  115. data/vendor/assets/javascripts/moment/pt-br.js +50 -60
  116. data/vendor/assets/javascripts/moment/pt.js +55 -65
  117. data/vendor/assets/javascripts/moment/ro.js +65 -75
  118. data/vendor/assets/javascripts/moment/ru.js +187 -191
  119. data/vendor/assets/javascripts/moment/sd.js +75 -86
  120. data/vendor/assets/javascripts/moment/se.js +50 -61
  121. data/vendor/assets/javascripts/moment/si.js +62 -72
  122. data/vendor/assets/javascripts/moment/sk.js +133 -143
  123. data/vendor/assets/javascripts/moment/sl.js +159 -169
  124. data/vendor/assets/javascripts/moment/sq.js +58 -69
  125. data/vendor/assets/javascripts/moment/sr-cyrl.js +117 -117
  126. data/vendor/assets/javascripts/moment/sr.js +119 -119
  127. data/vendor/assets/javascripts/moment/ss.js +76 -86
  128. data/vendor/assets/javascripts/moment/sv.js +63 -74
  129. data/vendor/assets/javascripts/moment/sw.js +48 -58
  130. data/vendor/assets/javascripts/moment/ta.js +121 -130
  131. data/vendor/assets/javascripts/moment/te.js +79 -88
  132. data/vendor/assets/javascripts/moment/tet.js +61 -72
  133. data/vendor/assets/javascripts/moment/tg.js +109 -119
  134. data/vendor/assets/javascripts/moment/th.js +58 -68
  135. data/vendor/assets/javascripts/moment/tk.js +85 -96
  136. data/vendor/assets/javascripts/moment/tl-ph.js +52 -63
  137. data/vendor/assets/javascripts/moment/tlh.js +109 -121
  138. data/vendor/assets/javascripts/moment/tr.js +99 -110
  139. data/vendor/assets/javascripts/moment/tzl.js +82 -93
  140. data/vendor/assets/javascripts/moment/tzm-latn.js +47 -57
  141. data/vendor/assets/javascripts/moment/tzm.js +47 -57
  142. data/vendor/assets/javascripts/moment/ug-cn.js +103 -113
  143. data/vendor/assets/javascripts/moment/uk.js +146 -153
  144. data/vendor/assets/javascripts/moment/ur.js +75 -86
  145. data/vendor/assets/javascripts/moment/uz-latn.js +47 -57
  146. data/vendor/assets/javascripts/moment/uz.js +46 -57
  147. data/vendor/assets/javascripts/moment/vi.js +72 -82
  148. data/vendor/assets/javascripts/moment/x-pseudo.js +64 -73
  149. data/vendor/assets/javascripts/moment/yo.js +48 -59
  150. data/vendor/assets/javascripts/moment/zh-cn.js +107 -118
  151. data/vendor/assets/javascripts/moment/zh-hk.js +93 -104
  152. data/vendor/assets/javascripts/moment/zh-mo.js +93 -104
  153. data/vendor/assets/javascripts/moment/zh-tw.js +93 -104
  154. data/vendor/assets/javascripts/moment.js +4945 -4938
  155. metadata +30 -86
  156. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/-H/-H77gbOgi-dwHJoevs2PsAJBV-nde7DFDWBPXqUrMkw.cache +0 -1
  157. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/-y/-ypqz4WBYM3Qftk20RenhtH0iPKxdtyu6t3hVOjJLL4.cache +0 -1
  158. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1g/1giZXIzjQTIHLJ30if0Cxp6LHLNLyLvCt66HPyr7S9Q.cache +0 -0
  159. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/1l/1l4oJ9T6GJ0pN-vGrH1QH9XT7AVF3Z9pakdHrxcsuXw.cache +0 -1
  160. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/4l/4laR_NL9p0jWaBh-kVGkzBwhRp0MzmdAkBI_mccpvxQ.cache +0 -2
  161. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/5A/5ACbsliWc2erDYoI0QUGjRXJIXW_JRiuIjLhVhIZc88.cache +0 -0
  162. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/5h/5h-ruujSKgsZz79GwDnzkAalkJoWGzpepGc2xuQDVsA.cache +0 -1
  163. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/5q/5qkRnQf0206eJO9YiwkpxUs7yZ4f50rNMuCFJaryc0c.cache +0 -2
  164. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/8e/8eQxu2zgyp7bsTrrVsa4QKmGNNNJ5YVMc2HsybmUamg.cache +0 -1
  165. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/9z/9zOsSzS7x1TCGFnvxdjQdrEL2MENRZARP2fzL5JYLF0.cache +0 -1
  166. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/AP/AP7JoF1ZWY1lf5txW64EpzKJEzOIsR9Wkn_V0pl6Kzo.cache +0 -0
  167. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Ai/AiuMstvaIxiBhMWFk2cj5HVrvdG-c98_PaheKtkPYj0.cache +0 -1
  168. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Bu/BuxnmLYpqxwN3qck74Nh3Adaqz5VwdArL7wCZx6TnII.cache +0 -2
  169. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/IN/INM03spFgth_-zzNy3cfUv3ATbaBRjFWWj1kGQYmcTA.cache +0 -1
  170. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Mn/MnWwrzXFar6jFGAfp8PS_cZXjeFYCA85xsTQT758958.cache +0 -0
  171. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/OM/OM7fRuvTUPQcZERsO6Tsv0fvTdZqsRZbN-mYK00TwnI.cache +0 -1
  172. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Pn/PnNlsrskw8SKHpOLkqJgEN_HjZzB2jsQZauj-dnQQ2A.cache +0 -0
  173. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Rf/RfFWq_tyttbS2wyfSc0kKvcSxUeC_m01sL3Dl6EWEqM.cache +0 -0
  174. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Ru/RuQ9HENefRmSoZaLfw7LalsxdBHpKJMyc2c3OQ_kQr8.cache +0 -3
  175. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/T-/T-9_ffpUxh6GAYTAzM3sF5lykyt9GVpcbKZaRXxw0wA.cache +0 -2
  176. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Yw/YwG9q2kyDHA7PseIrAE66Qe2IFNrhUtDbdgulyvgEfI.cache +0 -0
  177. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Zj/Zjn9OiwGREdMXvLZA-tY289lQslnn7R3BrSwhsntMWQ.cache +0 -3
  178. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Zm/Zmp1hSfJjOVQBTRXZ-xSs8qqIK6lmyQ4GK_uYVsDVJc.cache +0 -1
  179. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/bR/bRSmDUPNI--mMuAgRHWf1r56iydNwHRg_wniS8HqhNg.cache +0 -0
  180. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/dA/dAAcqCClwz0OKgpbEd9G3OUYKW1TeNqJV49Zxh2bQ5A.cache +0 -1
  181. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/dh/dhlLaVScr1-Ty5UFcg6xdU4xSWIuySWzjcC5OU2mOf4.cache +0 -0
  182. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/fw/fwDh4S50V5wK-MsABSBJ2ghx6XKATSRASedKP69FwnA.cache +0 -0
  183. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/gt/gtu4KqwPpmom4hwtRz9x180bzJzATR6V8hyE3uHsyas.cache +0 -3
  184. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/kl/klJHIoyRhrimisvwpjAPKxae89riL_0exIgpv4u3u5Y.cache +0 -0
  185. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/lw/lwVIcNwb-0tSyXePavJPzb_NJwTR5_Y-qNk_rkqyfLY.cache +0 -1
  186. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/m1/m16f5eEXdsOfzbCB88BS3eojIypOTYQjyyv5kkTDwxY.cache +0 -1
  187. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/mm/mmqv3-gEoPWhMrVamMnpI1csCNLKpv-qVQgHERXQNaU.cache +0 -2
  188. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/rp/rpqm2QeVJPWIySovDg4XdCnI6X5_FXCd0pZhuOnwAfk.cache +0 -1
  189. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/wq/wqYc1aiYr9phcM5WCWD3P8qxwERbfkuO8u-ZrsLaiPI.cache +0 -1
  190. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/wx/wxFkskdA6iSIVZxka368Y8wkP-3edr2nlW4VSOI6GhY.cache +0 -3
  191. data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/xP/xPbdGyTHlpGRgIS0gbG9suCByeakXeTFaQ1B_h3_aUI.cache +0 -0
@@ -3,125 +3,125 @@
3
3
  //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
4
4
  //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
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
- //! moment.js locale configuration
8
+ var translator = {
9
+ words: {
10
+ //Different grammatical cases
11
+ ss: ['секунда', 'секунде', 'секунди'],
12
+ m: ['један минут', 'једног минута'],
13
+ mm: ['минут', 'минута', 'минута'],
14
+ h: ['један сат', 'једног сата'],
15
+ hh: ['сат', 'сата', 'сати'],
16
+ d: ['један дан', 'једног дана'],
17
+ dd: ['дан', 'дана', 'дана'],
18
+ M: ['један месец', 'једног месеца'],
19
+ MM: ['месец', 'месеца', 'месеци'],
20
+ y: ['једну годину', 'једне године'],
21
+ yy: ['годину', 'године', 'година'],
22
+ },
23
+ correctGrammaticalCase: function (number, wordKey) {
24
+ if (
25
+ number % 10 >= 1 &&
26
+ number % 10 <= 4 &&
27
+ (number % 100 < 10 || number % 100 >= 20)
28
+ ) {
29
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
30
+ }
31
+ return wordKey[2];
32
+ },
33
+ translate: function (number, withoutSuffix, key, isFuture) {
34
+ var wordKey = translator.words[key],
35
+ word;
14
36
 
15
- var translator = {
16
- words: {
17
- //Different grammatical cases
18
- ss: ['секунда', 'секунде', 'секунди'],
19
- m: ['један минут', 'једне минуте'],
20
- mm: ['минут', 'минуте', 'минута'],
21
- h: ['један сат', 'једног сата'],
22
- hh: ['сат', 'сата', 'сати'],
23
- dd: ['дан', 'дана', 'дана'],
24
- MM: ['месец', 'месеца', 'месеци'],
25
- yy: ['година', 'године', 'година'],
26
- },
27
- correctGrammaticalCase: function (number, wordKey) {
28
- return number === 1
29
- ? wordKey[0]
30
- : number >= 2 && number <= 4
31
- ? wordKey[1]
32
- : wordKey[2];
33
- },
34
- translate: function (number, withoutSuffix, key) {
35
- var wordKey = translator.words[key];
36
- if (key.length === 1) {
37
- return withoutSuffix ? wordKey[0] : wordKey[1];
38
- } else {
39
- return (
40
- number +
41
- ' ' +
42
- translator.correctGrammaticalCase(number, wordKey)
43
- );
44
- }
45
- },
46
- };
37
+ if (key.length === 1) {
38
+ // Nominativ
39
+ if (key === 'y' && withoutSuffix) return 'једна година';
40
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
41
+ }
47
42
 
48
- var srCyrl = moment.defineLocale('sr-cyrl', {
49
- months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
50
- '_'
51
- ),
52
- monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split(
53
- '_'
54
- ),
55
- monthsParseExact: true,
56
- weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
57
- weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
58
- weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
59
- weekdaysParseExact: true,
60
- longDateFormat: {
61
- LT: 'H:mm',
62
- LTS: 'H:mm:ss',
63
- L: 'D. M. YYYY.',
64
- LL: 'D. MMMM YYYY.',
65
- LLL: 'D. MMMM YYYY. H:mm',
66
- LLLL: 'dddd, D. MMMM YYYY. H:mm',
67
- },
68
- calendar: {
69
- sameDay: '[данас у] LT',
70
- nextDay: '[сутра у] LT',
71
- nextWeek: function () {
72
- switch (this.day()) {
73
- case 0:
74
- return '[у] [недељу] [у] LT';
75
- case 3:
76
- return '[у] [среду] [у] LT';
77
- case 6:
78
- return '[у] [суботу] [у] LT';
79
- case 1:
80
- case 2:
81
- case 4:
82
- case 5:
83
- return '[у] dddd [у] LT';
84
- }
85
- },
86
- lastDay: '[јуче у] LT',
87
- lastWeek: function () {
88
- var lastWeekDays = [
89
- '[прошле] [недеље] [у] LT',
90
- '[прошлог] [понедељка] [у] LT',
91
- '[прошлог] [уторка] [у] LT',
92
- '[прошле] [среде] [у] LT',
93
- '[прошлог] [четвртка] [у] LT',
94
- '[прошлог] [петка] [у] LT',
95
- '[прошле] [суботе] [у] LT',
96
- ];
97
- return lastWeekDays[this.day()];
98
- },
99
- sameElse: 'L',
100
- },
101
- relativeTime: {
102
- future: 'за %s',
103
- past: 'пре %s',
104
- s: 'неколико секунди',
105
- ss: translator.translate,
106
- m: translator.translate,
107
- mm: translator.translate,
108
- h: translator.translate,
109
- hh: translator.translate,
110
- d: 'дан',
111
- dd: translator.translate,
112
- M: 'месец',
113
- MM: translator.translate,
114
- y: 'годину',
115
- yy: translator.translate,
116
- },
117
- dayOfMonthOrdinalParse: /\d{1,2}\./,
118
- ordinal: '%d.',
119
- week: {
120
- dow: 1, // Monday is the first day of the week.
121
- doy: 7, // The week that contains Jan 1st is the first week of the year.
122
- },
123
- });
43
+ word = translator.correctGrammaticalCase(number, wordKey);
44
+ // Nominativ
45
+ if (key === 'yy' && withoutSuffix && word === 'годину') {
46
+ return number + ' година';
47
+ }
124
48
 
125
- return srCyrl;
49
+ return number + ' ' + word;
50
+ },
51
+ };
126
52
 
127
- })));
53
+ export default moment.defineLocale('sr-cyrl', {
54
+ months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
55
+ '_'
56
+ ),
57
+ monthsShort:
58
+ 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
59
+ monthsParseExact: true,
60
+ weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
61
+ weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
62
+ weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
63
+ weekdaysParseExact: true,
64
+ longDateFormat: {
65
+ LT: 'H:mm',
66
+ LTS: 'H:mm:ss',
67
+ L: 'D. M. YYYY.',
68
+ LL: 'D. MMMM YYYY.',
69
+ LLL: 'D. MMMM YYYY. H:mm',
70
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
71
+ },
72
+ calendar: {
73
+ sameDay: '[данас у] LT',
74
+ nextDay: '[сутра у] LT',
75
+ nextWeek: function () {
76
+ switch (this.day()) {
77
+ case 0:
78
+ return '[у] [недељу] [у] LT';
79
+ case 3:
80
+ return '[у] [среду] [у] LT';
81
+ case 6:
82
+ return '[у] [суботу] [у] LT';
83
+ case 1:
84
+ case 2:
85
+ case 4:
86
+ case 5:
87
+ return '[у] dddd [у] LT';
88
+ }
89
+ },
90
+ lastDay: '[јуче у] LT',
91
+ lastWeek: function () {
92
+ var lastWeekDays = [
93
+ '[прошле] [недеље] [у] LT',
94
+ '[прошлог] [понедељка] [у] LT',
95
+ '[прошлог] [уторка] [у] LT',
96
+ '[прошле] [среде] [у] LT',
97
+ '[прошлог] [четвртка] [у] LT',
98
+ '[прошлог] [петка] [у] LT',
99
+ '[прошле] [суботе] [у] LT',
100
+ ];
101
+ return lastWeekDays[this.day()];
102
+ },
103
+ sameElse: 'L',
104
+ },
105
+ relativeTime: {
106
+ future: 'за %s',
107
+ past: 'пре %s',
108
+ s: 'неколико секунди',
109
+ ss: translator.translate,
110
+ m: translator.translate,
111
+ mm: translator.translate,
112
+ h: translator.translate,
113
+ hh: translator.translate,
114
+ d: translator.translate,
115
+ dd: translator.translate,
116
+ M: translator.translate,
117
+ MM: translator.translate,
118
+ y: translator.translate,
119
+ yy: translator.translate,
120
+ },
121
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
122
+ ordinal: '%d.',
123
+ week: {
124
+ dow: 1, // Monday is the first day of the week.
125
+ doy: 7, // The week that contains Jan 1st is the first week of the year.
126
+ },
127
+ });
@@ -3,127 +3,127 @@
3
3
  //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
4
4
  //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
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
- //! moment.js locale configuration
8
+ var translator = {
9
+ words: {
10
+ //Different grammatical cases
11
+ ss: ['sekunda', 'sekunde', 'sekundi'],
12
+ m: ['jedan minut', 'jednog minuta'],
13
+ mm: ['minut', 'minuta', 'minuta'],
14
+ h: ['jedan sat', 'jednog sata'],
15
+ hh: ['sat', 'sata', 'sati'],
16
+ d: ['jedan dan', 'jednog dana'],
17
+ dd: ['dan', 'dana', 'dana'],
18
+ M: ['jedan mesec', 'jednog meseca'],
19
+ MM: ['mesec', 'meseca', 'meseci'],
20
+ y: ['jednu godinu', 'jedne godine'],
21
+ yy: ['godinu', 'godine', 'godina'],
22
+ },
23
+ correctGrammaticalCase: function (number, wordKey) {
24
+ if (
25
+ number % 10 >= 1 &&
26
+ number % 10 <= 4 &&
27
+ (number % 100 < 10 || number % 100 >= 20)
28
+ ) {
29
+ return number % 10 === 1 ? wordKey[0] : wordKey[1];
30
+ }
31
+ return wordKey[2];
32
+ },
33
+ translate: function (number, withoutSuffix, key, isFuture) {
34
+ var wordKey = translator.words[key],
35
+ word;
14
36
 
15
- var translator = {
16
- words: {
17
- //Different grammatical cases
18
- ss: ['sekunda', 'sekunde', 'sekundi'],
19
- m: ['jedan minut', 'jedne minute'],
20
- mm: ['minut', 'minute', 'minuta'],
21
- h: ['jedan sat', 'jednog sata'],
22
- hh: ['sat', 'sata', 'sati'],
23
- dd: ['dan', 'dana', 'dana'],
24
- MM: ['mesec', 'meseca', 'meseci'],
25
- yy: ['godina', 'godine', 'godina'],
26
- },
27
- correctGrammaticalCase: function (number, wordKey) {
28
- return number === 1
29
- ? wordKey[0]
30
- : number >= 2 && number <= 4
31
- ? wordKey[1]
32
- : wordKey[2];
33
- },
34
- translate: function (number, withoutSuffix, key) {
35
- var wordKey = translator.words[key];
36
- if (key.length === 1) {
37
- return withoutSuffix ? wordKey[0] : wordKey[1];
38
- } else {
39
- return (
40
- number +
41
- ' ' +
42
- translator.correctGrammaticalCase(number, wordKey)
43
- );
44
- }
45
- },
46
- };
37
+ if (key.length === 1) {
38
+ // Nominativ
39
+ if (key === 'y' && withoutSuffix) return 'jedna godina';
40
+ return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
41
+ }
47
42
 
48
- var sr = moment.defineLocale('sr', {
49
- months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
50
- '_'
51
- ),
52
- monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
53
- '_'
54
- ),
55
- monthsParseExact: true,
56
- weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
57
- '_'
58
- ),
59
- weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
60
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
61
- weekdaysParseExact: true,
62
- longDateFormat: {
63
- LT: 'H:mm',
64
- LTS: 'H:mm:ss',
65
- L: 'D. M. YYYY.',
66
- LL: 'D. MMMM YYYY.',
67
- LLL: 'D. MMMM YYYY. H:mm',
68
- LLLL: 'dddd, D. MMMM YYYY. H:mm',
69
- },
70
- calendar: {
71
- sameDay: '[danas u] LT',
72
- nextDay: '[sutra u] LT',
73
- nextWeek: function () {
74
- switch (this.day()) {
75
- case 0:
76
- return '[u] [nedelju] [u] LT';
77
- case 3:
78
- return '[u] [sredu] [u] LT';
79
- case 6:
80
- return '[u] [subotu] [u] LT';
81
- case 1:
82
- case 2:
83
- case 4:
84
- case 5:
85
- return '[u] dddd [u] LT';
86
- }
87
- },
88
- lastDay: '[juče u] LT',
89
- lastWeek: function () {
90
- var lastWeekDays = [
91
- '[prošle] [nedelje] [u] LT',
92
- '[prošlog] [ponedeljka] [u] LT',
93
- '[prošlog] [utorka] [u] LT',
94
- '[prošle] [srede] [u] LT',
95
- '[prošlog] [četvrtka] [u] LT',
96
- '[prošlog] [petka] [u] LT',
97
- '[prošle] [subote] [u] LT',
98
- ];
99
- return lastWeekDays[this.day()];
100
- },
101
- sameElse: 'L',
102
- },
103
- relativeTime: {
104
- future: 'za %s',
105
- past: 'pre %s',
106
- s: 'nekoliko sekundi',
107
- ss: translator.translate,
108
- m: translator.translate,
109
- mm: translator.translate,
110
- h: translator.translate,
111
- hh: translator.translate,
112
- d: 'dan',
113
- dd: translator.translate,
114
- M: 'mesec',
115
- MM: translator.translate,
116
- y: 'godinu',
117
- yy: translator.translate,
118
- },
119
- dayOfMonthOrdinalParse: /\d{1,2}\./,
120
- ordinal: '%d.',
121
- week: {
122
- dow: 1, // Monday is the first day of the week.
123
- doy: 7, // The week that contains Jan 7th is the first week of the year.
124
- },
125
- });
43
+ word = translator.correctGrammaticalCase(number, wordKey);
44
+ // Nominativ
45
+ if (key === 'yy' && withoutSuffix && word === 'godinu') {
46
+ return number + ' godina';
47
+ }
126
48
 
127
- return sr;
49
+ return number + ' ' + word;
50
+ },
51
+ };
128
52
 
129
- })));
53
+ export default moment.defineLocale('sr', {
54
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
55
+ '_'
56
+ ),
57
+ monthsShort:
58
+ 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
59
+ monthsParseExact: true,
60
+ weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
61
+ '_'
62
+ ),
63
+ weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
64
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
65
+ weekdaysParseExact: true,
66
+ longDateFormat: {
67
+ LT: 'H:mm',
68
+ LTS: 'H:mm:ss',
69
+ L: 'D. M. YYYY.',
70
+ LL: 'D. MMMM YYYY.',
71
+ LLL: 'D. MMMM YYYY. H:mm',
72
+ LLLL: 'dddd, D. MMMM YYYY. H:mm',
73
+ },
74
+ calendar: {
75
+ sameDay: '[danas u] LT',
76
+ nextDay: '[sutra u] LT',
77
+ nextWeek: function () {
78
+ switch (this.day()) {
79
+ case 0:
80
+ return '[u] [nedelju] [u] LT';
81
+ case 3:
82
+ return '[u] [sredu] [u] LT';
83
+ case 6:
84
+ return '[u] [subotu] [u] LT';
85
+ case 1:
86
+ case 2:
87
+ case 4:
88
+ case 5:
89
+ return '[u] dddd [u] LT';
90
+ }
91
+ },
92
+ lastDay: '[juče u] LT',
93
+ lastWeek: function () {
94
+ var lastWeekDays = [
95
+ '[prošle] [nedelje] [u] LT',
96
+ '[prošlog] [ponedeljka] [u] LT',
97
+ '[prošlog] [utorka] [u] LT',
98
+ '[prošle] [srede] [u] LT',
99
+ '[prošlog] [četvrtka] [u] LT',
100
+ '[prošlog] [petka] [u] LT',
101
+ '[prošle] [subote] [u] LT',
102
+ ];
103
+ return lastWeekDays[this.day()];
104
+ },
105
+ sameElse: 'L',
106
+ },
107
+ relativeTime: {
108
+ future: 'za %s',
109
+ past: 'pre %s',
110
+ s: 'nekoliko sekundi',
111
+ ss: translator.translate,
112
+ m: translator.translate,
113
+ mm: translator.translate,
114
+ h: translator.translate,
115
+ hh: translator.translate,
116
+ d: translator.translate,
117
+ dd: translator.translate,
118
+ M: translator.translate,
119
+ MM: translator.translate,
120
+ y: translator.translate,
121
+ yy: translator.translate,
122
+ },
123
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
124
+ ordinal: '%d.',
125
+ week: {
126
+ dow: 1, // Monday is the first day of the week.
127
+ doy: 7, // The week that contains Jan 7th is the first week of the year.
128
+ },
129
+ });
@@ -2,93 +2,83 @@
2
2
  //! locale : siSwati [ss]
3
3
  //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
4
4
 
5
- ;(function (global, factory) {
6
- typeof exports === 'object' && typeof module !== 'undefined'
7
- && typeof require === 'function' ? factory(require('../moment')) :
8
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
9
- factory(global.moment)
10
- }(this, (function (moment) { 'use strict';
5
+ import moment from '../moment';
11
6
 
12
- //! moment.js locale configuration
13
-
14
- var ss = moment.defineLocale('ss', {
15
- months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
16
- '_'
17
- ),
18
- monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
19
- weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
7
+ export default moment.defineLocale('ss', {
8
+ months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
9
+ '_'
10
+ ),
11
+ monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
12
+ weekdays:
13
+ 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
20
14
  '_'
21
15
  ),
22
- weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
23
- weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
24
- weekdaysParseExact: true,
25
- longDateFormat: {
26
- LT: 'h:mm A',
27
- LTS: 'h:mm:ss A',
28
- L: 'DD/MM/YYYY',
29
- LL: 'D MMMM YYYY',
30
- LLL: 'D MMMM YYYY h:mm A',
31
- LLLL: 'dddd, D MMMM YYYY h:mm A',
32
- },
33
- calendar: {
34
- sameDay: '[Namuhla nga] LT',
35
- nextDay: '[Kusasa nga] LT',
36
- nextWeek: 'dddd [nga] LT',
37
- lastDay: '[Itolo nga] LT',
38
- lastWeek: 'dddd [leliphelile] [nga] LT',
39
- sameElse: 'L',
40
- },
41
- relativeTime: {
42
- future: 'nga %s',
43
- past: 'wenteka nga %s',
44
- s: 'emizuzwana lomcane',
45
- ss: '%d mzuzwana',
46
- m: 'umzuzu',
47
- mm: '%d emizuzu',
48
- h: 'lihora',
49
- hh: '%d emahora',
50
- d: 'lilanga',
51
- dd: '%d emalanga',
52
- M: 'inyanga',
53
- MM: '%d tinyanga',
54
- y: 'umnyaka',
55
- yy: '%d iminyaka',
56
- },
57
- meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
58
- meridiem: function (hours, minutes, isLower) {
59
- if (hours < 11) {
60
- return 'ekuseni';
61
- } else if (hours < 15) {
62
- return 'emini';
63
- } else if (hours < 19) {
64
- return 'entsambama';
65
- } else {
66
- return 'ebusuku';
67
- }
68
- },
69
- meridiemHour: function (hour, meridiem) {
70
- if (hour === 12) {
71
- hour = 0;
16
+ weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
17
+ weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
18
+ weekdaysParseExact: true,
19
+ longDateFormat: {
20
+ LT: 'h:mm A',
21
+ LTS: 'h:mm:ss A',
22
+ L: 'DD/MM/YYYY',
23
+ LL: 'D MMMM YYYY',
24
+ LLL: 'D MMMM YYYY h:mm A',
25
+ LLLL: 'dddd, D MMMM YYYY h:mm A',
26
+ },
27
+ calendar: {
28
+ sameDay: '[Namuhla nga] LT',
29
+ nextDay: '[Kusasa nga] LT',
30
+ nextWeek: 'dddd [nga] LT',
31
+ lastDay: '[Itolo nga] LT',
32
+ lastWeek: 'dddd [leliphelile] [nga] LT',
33
+ sameElse: 'L',
34
+ },
35
+ relativeTime: {
36
+ future: 'nga %s',
37
+ past: 'wenteka nga %s',
38
+ s: 'emizuzwana lomcane',
39
+ ss: '%d mzuzwana',
40
+ m: 'umzuzu',
41
+ mm: '%d emizuzu',
42
+ h: 'lihora',
43
+ hh: '%d emahora',
44
+ d: 'lilanga',
45
+ dd: '%d emalanga',
46
+ M: 'inyanga',
47
+ MM: '%d tinyanga',
48
+ y: 'umnyaka',
49
+ yy: '%d iminyaka',
50
+ },
51
+ meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
52
+ meridiem: function (hours, minutes, isLower) {
53
+ if (hours < 11) {
54
+ return 'ekuseni';
55
+ } else if (hours < 15) {
56
+ return 'emini';
57
+ } else if (hours < 19) {
58
+ return 'entsambama';
59
+ } else {
60
+ return 'ebusuku';
61
+ }
62
+ },
63
+ meridiemHour: function (hour, meridiem) {
64
+ if (hour === 12) {
65
+ hour = 0;
66
+ }
67
+ if (meridiem === 'ekuseni') {
68
+ return hour;
69
+ } else if (meridiem === 'emini') {
70
+ return hour >= 11 ? hour : hour + 12;
71
+ } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
72
+ if (hour === 0) {
73
+ return 0;
72
74
  }
73
- if (meridiem === 'ekuseni') {
74
- return hour;
75
- } else if (meridiem === 'emini') {
76
- return hour >= 11 ? hour : hour + 12;
77
- } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
78
- if (hour === 0) {
79
- return 0;
80
- }
81
- return hour + 12;
82
- }
83
- },
84
- dayOfMonthOrdinalParse: /\d{1,2}/,
85
- ordinal: '%d',
86
- week: {
87
- dow: 1, // Monday is the first day of the week.
88
- doy: 4, // The week that contains Jan 4th is the first week of the year.
89
- },
90
- });
91
-
92
- return ss;
93
-
94
- })));
75
+ return hour + 12;
76
+ }
77
+ },
78
+ dayOfMonthOrdinalParse: /\d{1,2}/,
79
+ ordinal: '%d',
80
+ week: {
81
+ dow: 1, // Monday is the first day of the week.
82
+ doy: 4, // The week that contains Jan 4th is the first week of the year.
83
+ },
84
+ });