momentjs-rails 2.20.1 → 2.29.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/news.md +12 -0
- data/test/dummy/app/assets/config/manifest.js +1 -0
- data/test/dummy/config/environments/development.rb +2 -0
- data/test/dummy/config/environments/production.rb +1 -0
- data/test/dummy/config/environments/test.rb +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/0t/0ty_fqRlzF-hGYQebubBsuGgCeT9YnqkULkaCu1nwMk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3D/3DLOuccQFCZCWz_kmyP6PagEyQM5ne4ONIzBwdwG-fY.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/3h/3hk-k7Z5qoOh6S1dyiOjpfiwRfblMf4NpG3NVkO_4GQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/81/81FXcACo3ySybaa-2mJ9JsZ4xXvXxgi6rAT9sildrVs.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/97/97gKfWGwqo7IhT-5nqdT3p547QEt2G9nbmU5XVAtEeE.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/GO/GOYA_gO9tZqOtwNUptOfYUG1F6q5BF1ZZI0Wr7itvYM.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/NG/NGyfZ_kRU3oHnf8bEjRHJwpjyx0NF_U8V_ENdenCoIg.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/R9/R9pPKpyMZFVnjZL7kwY21faYzV2WpIx_hPb5GrUown8.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/W1/W1cCnSuixTbIt3rgc5Z-4BGC1iBfw6gqKVjuOh66lSY.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/Xr/Xr9AioDZNswMqHmbREXo4J_kNVPlbysC8G37BX65-rY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/lK/lKG81FVPPHkSni295teRgLDoWVYRamY_BCSFxMiagSs.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/q7/q7CVcZSJHIEQqdPLpSAb4YHepJZFY541_7ToMaHvbtA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/wF/wFKYFOm2u1A3crk6JyBKUw2L5ybvI0Tbt2jPPZXfdWQ.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v4.0.0/yY/yY97dYnGEDUjVioT9bUJucvTt0w_ToimRXWj3YYvD10.cache +0 -0
- data/test/integration/navigation_test.rb +1 -1
- data/vendor/assets/javascripts/moment/af.js +67 -59
- data/vendor/assets/javascripts/moment/ar-dz.js +153 -46
- data/vendor/assets/javascripts/moment/ar-kw.js +51 -45
- data/vendor/assets/javascripts/moment/ar-ly.js +167 -112
- data/vendor/assets/javascripts/moment/ar-ma.js +51 -45
- data/vendor/assets/javascripts/moment/ar-sa.js +100 -90
- data/vendor/assets/javascripts/moment/ar-tn.js +51 -45
- data/vendor/assets/javascripts/moment/ar.js +182 -125
- data/vendor/assets/javascripts/moment/az.js +97 -90
- data/vendor/assets/javascripts/moment/be.js +130 -112
- data/vendor/assets/javascripts/moment/bg.js +81 -74
- data/vendor/assets/javascripts/moment/bm.js +47 -45
- data/vendor/assets/javascripts/moment/bn-bd.js +140 -0
- data/vendor/assets/javascripts/moment/bn.js +113 -103
- data/vendor/assets/javascripts/moment/bo.js +118 -103
- data/vendor/assets/javascripts/moment/br.js +158 -88
- data/vendor/assets/javascripts/moment/bs.js +141 -133
- data/vendor/assets/javascripts/moment/ca.js +91 -69
- data/vendor/assets/javascripts/moment/cs.js +172 -161
- data/vendor/assets/javascripts/moment/cv.js +58 -48
- data/vendor/assets/javascripts/moment/cy.js +92 -65
- data/vendor/assets/javascripts/moment/da.js +49 -46
- data/vendor/assets/javascripts/moment/de-at.js +71 -61
- data/vendor/assets/javascripts/moment/de-ch.js +71 -63
- data/vendor/assets/javascripts/moment/de.js +71 -61
- data/vendor/assets/javascripts/moment/dv.js +85 -85
- data/vendor/assets/javascripts/moment/el.js +99 -83
- data/vendor/assets/javascripts/moment/en-au.js +64 -53
- data/vendor/assets/javascripts/moment/en-ca.js +60 -49
- data/vendor/assets/javascripts/moment/en-gb.js +64 -53
- data/vendor/assets/javascripts/moment/en-ie.js +64 -53
- data/vendor/assets/javascripts/moment/en-il.js +75 -0
- data/vendor/assets/javascripts/moment/en-in.js +79 -0
- data/vendor/assets/javascripts/moment/en-nz.js +64 -53
- data/vendor/assets/javascripts/moment/en-sg.js +79 -0
- data/vendor/assets/javascripts/moment/eo.js +62 -57
- data/vendor/assets/javascripts/moment/es-do.js +99 -72
- data/vendor/assets/javascripts/moment/es-mx.js +121 -0
- data/vendor/assets/javascripts/moment/es-us.js +100 -63
- data/vendor/assets/javascripts/moment/es.js +100 -72
- data/vendor/assets/javascripts/moment/et.js +71 -64
- data/vendor/assets/javascripts/moment/eu.js +61 -52
- data/vendor/assets/javascripts/moment/fa.js +108 -92
- data/vendor/assets/javascripts/moment/fi.js +118 -93
- data/vendor/assets/javascripts/moment/fil.js +69 -0
- data/vendor/assets/javascripts/moment/fo.js +53 -46
- data/vendor/assets/javascripts/moment/fr-ca.js +65 -59
- data/vendor/assets/javascripts/moment/fr-ch.js +69 -63
- data/vendor/assets/javascripts/moment/fr.js +102 -67
- data/vendor/assets/javascripts/moment/fy.js +70 -60
- data/vendor/assets/javascripts/moment/ga.js +106 -0
- data/vendor/assets/javascripts/moment/gd.js +90 -61
- data/vendor/assets/javascripts/moment/gl.js +67 -59
- data/vendor/assets/javascripts/moment/gom-deva.js +137 -0
- data/vendor/assets/javascripts/moment/gom-latn.js +119 -108
- data/vendor/assets/javascripts/moment/gu.js +117 -109
- data/vendor/assets/javascripts/moment/he.js +84 -79
- data/vendor/assets/javascripts/moment/hi.js +163 -109
- data/vendor/assets/javascripts/moment/hr.js +148 -136
- data/vendor/assets/javascripts/moment/hu.js +110 -92
- data/vendor/assets/javascripts/moment/hy-am.js +88 -79
- data/vendor/assets/javascripts/moment/id.js +71 -68
- data/vendor/assets/javascripts/moment/is.js +128 -110
- data/vendor/assets/javascripts/moment/it-ch.js +75 -0
- data/vendor/assets/javascripts/moment/it.js +99 -53
- data/vendor/assets/javascripts/moment/ja.js +144 -66
- data/vendor/assets/javascripts/moment/jv.js +71 -68
- data/vendor/assets/javascripts/moment/ka.js +85 -72
- data/vendor/assets/javascripts/moment/kk.js +77 -72
- data/vendor/assets/javascripts/moment/km.js +99 -44
- data/vendor/assets/javascripts/moment/kn.js +119 -111
- data/vendor/assets/javascripts/moment/ko.js +70 -67
- data/vendor/assets/javascripts/moment/ku.js +129 -0
- data/vendor/assets/javascripts/moment/ky.js +79 -73
- data/vendor/assets/javascripts/moment/lb.js +125 -115
- data/vendor/assets/javascripts/moment/lo.js +62 -56
- data/vendor/assets/javascripts/moment/lt.js +117 -100
- data/vendor/assets/javascripts/moment/lv.js +87 -81
- data/vendor/assets/javascripts/moment/me.js +109 -94
- data/vendor/assets/javascripts/moment/mi.js +56 -50
- data/vendor/assets/javascripts/moment/mk.js +80 -74
- data/vendor/assets/javascripts/moment/ml.js +77 -66
- data/vendor/assets/javascripts/moment/mn.js +111 -0
- data/vendor/assets/javascripts/moment/mr.js +194 -142
- data/vendor/assets/javascripts/moment/ms-my.js +71 -68
- data/vendor/assets/javascripts/moment/ms.js +71 -68
- data/vendor/assets/javascripts/moment/mt.js +52 -46
- data/vendor/assets/javascripts/moment/my.js +83 -78
- data/vendor/assets/javascripts/moment/nb.js +55 -48
- data/vendor/assets/javascripts/moment/ne.js +116 -108
- data/vendor/assets/javascripts/moment/nl-be.js +93 -69
- data/vendor/assets/javascripts/moment/nl.js +95 -69
- data/vendor/assets/javascripts/moment/nn.js +56 -47
- data/vendor/assets/javascripts/moment/oc-lnc.js +96 -0
- data/vendor/assets/javascripts/moment/pa-in.js +117 -109
- data/vendor/assets/javascripts/moment/pl.js +128 -104
- data/vendor/assets/javascripts/moment/pt-br.js +53 -46
- data/vendor/assets/javascripts/moment/pt.js +58 -50
- data/vendor/assets/javascripts/moment/ro.js +69 -59
- data/vendor/assets/javascripts/moment/ru.js +194 -155
- data/vendor/assets/javascripts/moment/sd.js +76 -83
- data/vendor/assets/javascripts/moment/se.js +53 -47
- data/vendor/assets/javascripts/moment/si.js +65 -57
- data/vendor/assets/javascripts/moment/sk.js +136 -138
- data/vendor/assets/javascripts/moment/sl.js +162 -154
- data/vendor/assets/javascripts/moment/sq.js +59 -54
- data/vendor/assets/javascripts/moment/sr-cyrl.js +119 -93
- data/vendor/assets/javascripts/moment/sr.js +121 -93
- data/vendor/assets/javascripts/moment/ss.js +79 -74
- data/vendor/assets/javascripts/moment/sv.js +64 -55
- data/vendor/assets/javascripts/moment/sw.js +51 -45
- data/vendor/assets/javascripts/moment/ta.js +126 -115
- data/vendor/assets/javascripts/moment/te.js +84 -75
- data/vendor/assets/javascripts/moment/tet.js +63 -53
- data/vendor/assets/javascripts/moment/tg.js +128 -0
- data/vendor/assets/javascripts/moment/th.js +61 -53
- data/vendor/assets/javascripts/moment/tk.js +102 -0
- data/vendor/assets/javascripts/moment/tl-ph.js +53 -48
- data/vendor/assets/javascripts/moment/tlh.js +113 -101
- data/vendor/assets/javascripts/moment/tr.js +100 -74
- data/vendor/assets/javascripts/moment/tzl.js +83 -76
- data/vendor/assets/javascripts/moment/tzm-latn.js +50 -44
- data/vendor/assets/javascripts/moment/tzm.js +50 -44
- data/vendor/assets/javascripts/moment/ug-cn.js +122 -0
- data/vendor/assets/javascripts/moment/uk.js +155 -130
- data/vendor/assets/javascripts/moment/ur.js +76 -83
- data/vendor/assets/javascripts/moment/uz-latn.js +50 -44
- data/vendor/assets/javascripts/moment/uz.js +47 -44
- data/vendor/assets/javascripts/moment/vi.js +76 -65
- data/vendor/assets/javascripts/moment/x-pseudo.js +69 -54
- data/vendor/assets/javascripts/moment/yo.js +49 -46
- data/vendor/assets/javascripts/moment/zh-cn.js +115 -96
- data/vendor/assets/javascripts/moment/zh-hk.js +95 -89
- data/vendor/assets/javascripts/moment/zh-mo.js +111 -0
- data/vendor/assets/javascripts/moment/zh-tw.js +94 -89
- data/vendor/assets/javascripts/moment.js +5030 -3880
- metadata +64 -31
- data/test/dummy/tmp/cache/assets/D1C/680/sprockets%2F16ed4d5afdb2919596e6f8790e2116c2 +0 -0
- data/test/dummy/tmp/cache/assets/D35/CA0/sprockets%2F493e64bce2d302801dc01cf7cd096a58 +0 -0
- data/test/dummy/tmp/cache/assets/D3F/5F0/sprockets%2F4a6c53eae7c6e41a69a191578bbb6417 +0 -0
- data/test/dummy/tmp/cache/assets/D58/BD0/sprockets%2F4de9ddc9b725c715a54c98697b2528fe +0 -0
- data/test/dummy/tmp/cache/assets/D75/510/sprockets%2Fe690787ac522f47a6be024bfcc1767ee +0 -0
- data/test/dummy/tmp/cache/assets/E10/250/sprockets%2Fe4badb9ddfda484eb9671bf88567be61 +0 -0
@@ -9,58 +9,66 @@
|
|
9
9
|
factory(global.moment)
|
10
10
|
}(this, (function (moment) { 'use strict';
|
11
11
|
|
12
|
+
//! moment.js locale configuration
|
12
13
|
|
13
|
-
var pt = moment.defineLocale('pt', {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
lastDay: '[Ontem às] LT',
|
33
|
-
lastWeek: function () {
|
34
|
-
return (this.day() === 0 || this.day() === 6) ?
|
35
|
-
'[Último] dddd [às] LT' : // Saturday + Sunday
|
36
|
-
'[Última] dddd [às] LT'; // Monday - Friday
|
14
|
+
var pt = moment.defineLocale('pt', {
|
15
|
+
months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
|
16
|
+
'_'
|
17
|
+
),
|
18
|
+
monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
|
19
|
+
weekdays:
|
20
|
+
'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
|
21
|
+
'_'
|
22
|
+
),
|
23
|
+
weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
|
24
|
+
weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
|
25
|
+
weekdaysParseExact: true,
|
26
|
+
longDateFormat: {
|
27
|
+
LT: 'HH:mm',
|
28
|
+
LTS: 'HH:mm:ss',
|
29
|
+
L: 'DD/MM/YYYY',
|
30
|
+
LL: 'D [de] MMMM [de] YYYY',
|
31
|
+
LLL: 'D [de] MMMM [de] YYYY HH:mm',
|
32
|
+
LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
|
37
33
|
},
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
34
|
+
calendar: {
|
35
|
+
sameDay: '[Hoje às] LT',
|
36
|
+
nextDay: '[Amanhã às] LT',
|
37
|
+
nextWeek: 'dddd [às] LT',
|
38
|
+
lastDay: '[Ontem às] LT',
|
39
|
+
lastWeek: function () {
|
40
|
+
return this.day() === 0 || this.day() === 6
|
41
|
+
? '[Último] dddd [às] LT' // Saturday + Sunday
|
42
|
+
: '[Última] dddd [às] LT'; // Monday - Friday
|
43
|
+
},
|
44
|
+
sameElse: 'L',
|
45
|
+
},
|
46
|
+
relativeTime: {
|
47
|
+
future: 'em %s',
|
48
|
+
past: 'há %s',
|
49
|
+
s: 'segundos',
|
50
|
+
ss: '%d segundos',
|
51
|
+
m: 'um minuto',
|
52
|
+
mm: '%d minutos',
|
53
|
+
h: 'uma hora',
|
54
|
+
hh: '%d horas',
|
55
|
+
d: 'um dia',
|
56
|
+
dd: '%d dias',
|
57
|
+
w: 'uma semana',
|
58
|
+
ww: '%d semanas',
|
59
|
+
M: 'um mês',
|
60
|
+
MM: '%d meses',
|
61
|
+
y: 'um ano',
|
62
|
+
yy: '%d anos',
|
63
|
+
},
|
64
|
+
dayOfMonthOrdinalParse: /\d{1,2}º/,
|
65
|
+
ordinal: '%dº',
|
66
|
+
week: {
|
67
|
+
dow: 1, // Monday is the first day of the week.
|
68
|
+
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
69
|
+
},
|
70
|
+
});
|
63
71
|
|
64
|
-
return pt;
|
72
|
+
return pt;
|
65
73
|
|
66
74
|
})));
|
@@ -2,6 +2,7 @@
|
|
2
2
|
//! locale : Romanian [ro]
|
3
3
|
//! author : Vlad Gurdiga : https://github.com/gurdiga
|
4
4
|
//! author : Valentin Agachi : https://github.com/avaly
|
5
|
+
//! author : Emanuel Cepoi : https://github.com/cepem
|
5
6
|
|
6
7
|
;(function (global, factory) {
|
7
8
|
typeof exports === 'object' && typeof module !== 'undefined'
|
@@ -10,68 +11,77 @@
|
|
10
11
|
factory(global.moment)
|
11
12
|
}(this, (function (moment) { 'use strict';
|
12
13
|
|
14
|
+
//! moment.js locale configuration
|
13
15
|
|
14
|
-
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
16
|
+
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
17
|
+
var format = {
|
18
|
+
ss: 'secunde',
|
19
|
+
mm: 'minute',
|
20
|
+
hh: 'ore',
|
21
|
+
dd: 'zile',
|
22
|
+
ww: 'săptămâni',
|
23
|
+
MM: 'luni',
|
24
|
+
yy: 'ani',
|
25
|
+
},
|
26
|
+
separator = ' ';
|
27
|
+
if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
|
28
|
+
separator = ' de ';
|
29
|
+
}
|
30
|
+
return number + separator + format[key];
|
26
31
|
}
|
27
|
-
return number + separator + format[key];
|
28
|
-
}
|
29
32
|
|
30
|
-
var ro = moment.defineLocale('ro', {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
33
|
+
var ro = moment.defineLocale('ro', {
|
34
|
+
months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
|
35
|
+
'_'
|
36
|
+
),
|
37
|
+
monthsShort:
|
38
|
+
'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
|
39
|
+
'_'
|
40
|
+
),
|
41
|
+
monthsParseExact: true,
|
42
|
+
weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
|
43
|
+
weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
|
44
|
+
weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
|
45
|
+
longDateFormat: {
|
46
|
+
LT: 'H:mm',
|
47
|
+
LTS: 'H:mm:ss',
|
48
|
+
L: 'DD.MM.YYYY',
|
49
|
+
LL: 'D MMMM YYYY',
|
50
|
+
LLL: 'D MMMM YYYY H:mm',
|
51
|
+
LLLL: 'dddd, D MMMM YYYY H:mm',
|
52
|
+
},
|
53
|
+
calendar: {
|
54
|
+
sameDay: '[azi la] LT',
|
55
|
+
nextDay: '[mâine la] LT',
|
56
|
+
nextWeek: 'dddd [la] LT',
|
57
|
+
lastDay: '[ieri la] LT',
|
58
|
+
lastWeek: '[fosta] dddd [la] LT',
|
59
|
+
sameElse: 'L',
|
60
|
+
},
|
61
|
+
relativeTime: {
|
62
|
+
future: 'peste %s',
|
63
|
+
past: '%s în urmă',
|
64
|
+
s: 'câteva secunde',
|
65
|
+
ss: relativeTimeWithPlural,
|
66
|
+
m: 'un minut',
|
67
|
+
mm: relativeTimeWithPlural,
|
68
|
+
h: 'o oră',
|
69
|
+
hh: relativeTimeWithPlural,
|
70
|
+
d: 'o zi',
|
71
|
+
dd: relativeTimeWithPlural,
|
72
|
+
w: 'o săptămână',
|
73
|
+
ww: relativeTimeWithPlural,
|
74
|
+
M: 'o lună',
|
75
|
+
MM: relativeTimeWithPlural,
|
76
|
+
y: 'un an',
|
77
|
+
yy: relativeTimeWithPlural,
|
78
|
+
},
|
79
|
+
week: {
|
80
|
+
dow: 1, // Monday is the first day of the week.
|
81
|
+
doy: 7, // The week that contains Jan 7th is the first week of the year.
|
82
|
+
},
|
83
|
+
});
|
74
84
|
|
75
|
-
return ro;
|
85
|
+
return ro;
|
76
86
|
|
77
87
|
})));
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//! moment.js locale configuration
|
2
2
|
//! locale : Russian [ru]
|
3
3
|
//! author : Viktorminator : https://github.com/Viktorminator
|
4
|
-
//!
|
4
|
+
//! author : Menelion Elensúle : https://github.com/Oire
|
5
5
|
//! author : Коренберг Марк : https://github.com/socketpair
|
6
6
|
|
7
7
|
;(function (global, factory) {
|
@@ -11,175 +11,214 @@
|
|
11
11
|
factory(global.moment)
|
12
12
|
}(this, (function (moment) { 'use strict';
|
13
13
|
|
14
|
+
//! moment.js locale configuration
|
14
15
|
|
15
|
-
function plural(word, num) {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
|
23
|
-
'hh': 'час_часа_часов',
|
24
|
-
'dd': 'день_дня_дней',
|
25
|
-
'MM': 'месяц_месяца_месяцев',
|
26
|
-
'yy': 'год_года_лет'
|
27
|
-
};
|
28
|
-
if (key === 'm') {
|
29
|
-
return withoutSuffix ? 'минута' : 'минуту';
|
16
|
+
function plural(word, num) {
|
17
|
+
var forms = word.split('_');
|
18
|
+
return num % 10 === 1 && num % 100 !== 11
|
19
|
+
? forms[0]
|
20
|
+
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
|
21
|
+
? forms[1]
|
22
|
+
: forms[2];
|
30
23
|
}
|
31
|
-
|
32
|
-
|
24
|
+
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
25
|
+
var format = {
|
26
|
+
ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
|
27
|
+
mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
|
28
|
+
hh: 'час_часа_часов',
|
29
|
+
dd: 'день_дня_дней',
|
30
|
+
ww: 'неделя_недели_недель',
|
31
|
+
MM: 'месяц_месяца_месяцев',
|
32
|
+
yy: 'год_года_лет',
|
33
|
+
};
|
34
|
+
if (key === 'm') {
|
35
|
+
return withoutSuffix ? 'минута' : 'минуту';
|
36
|
+
} else {
|
37
|
+
return number + ' ' + plural(format[key], +number);
|
38
|
+
}
|
33
39
|
}
|
34
|
-
|
35
|
-
|
40
|
+
var monthsParse = [
|
41
|
+
/^янв/i,
|
42
|
+
/^фев/i,
|
43
|
+
/^мар/i,
|
44
|
+
/^апр/i,
|
45
|
+
/^ма[йя]/i,
|
46
|
+
/^июн/i,
|
47
|
+
/^июл/i,
|
48
|
+
/^авг/i,
|
49
|
+
/^сен/i,
|
50
|
+
/^окт/i,
|
51
|
+
/^ноя/i,
|
52
|
+
/^дек/i,
|
53
|
+
];
|
36
54
|
|
37
|
-
// http://new.gramota.ru/spravka/rules/139-prop : § 103
|
38
|
-
// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
|
39
|
-
// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
|
40
|
-
var ru = moment.defineLocale('ru', {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
55
|
+
// http://new.gramota.ru/spravka/rules/139-prop : § 103
|
56
|
+
// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
|
57
|
+
// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
|
58
|
+
var ru = moment.defineLocale('ru', {
|
59
|
+
months: {
|
60
|
+
format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
|
61
|
+
'_'
|
62
|
+
),
|
63
|
+
standalone:
|
64
|
+
'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
|
65
|
+
'_'
|
66
|
+
),
|
67
|
+
},
|
68
|
+
monthsShort: {
|
69
|
+
// по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
|
70
|
+
format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
|
71
|
+
'_'
|
72
|
+
),
|
73
|
+
standalone:
|
74
|
+
'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
|
75
|
+
'_'
|
76
|
+
),
|
77
|
+
},
|
78
|
+
weekdays: {
|
79
|
+
standalone:
|
80
|
+
'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
|
81
|
+
'_'
|
82
|
+
),
|
83
|
+
format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
|
84
|
+
'_'
|
85
|
+
),
|
86
|
+
isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
|
87
|
+
},
|
88
|
+
weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
|
89
|
+
weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
|
90
|
+
monthsParse: monthsParse,
|
91
|
+
longMonthsParse: monthsParse,
|
92
|
+
shortMonthsParse: monthsParse,
|
60
93
|
|
61
|
-
|
62
|
-
|
94
|
+
// полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
|
95
|
+
monthsRegex:
|
96
|
+
/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
|
63
97
|
|
64
|
-
|
65
|
-
|
98
|
+
// копия предыдущего
|
99
|
+
monthsShortRegex:
|
100
|
+
/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
|
66
101
|
|
67
|
-
|
68
|
-
|
102
|
+
// полные названия с падежами
|
103
|
+
monthsStrictRegex:
|
104
|
+
/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
|
69
105
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
106
|
+
// Выражение, которое соответствует только сокращённым формам
|
107
|
+
monthsShortStrictRegex:
|
108
|
+
/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
|
109
|
+
longDateFormat: {
|
110
|
+
LT: 'H:mm',
|
111
|
+
LTS: 'H:mm:ss',
|
112
|
+
L: 'DD.MM.YYYY',
|
113
|
+
LL: 'D MMMM YYYY г.',
|
114
|
+
LLL: 'D MMMM YYYY г., H:mm',
|
115
|
+
LLLL: 'dddd, D MMMM YYYY г., H:mm',
|
116
|
+
},
|
117
|
+
calendar: {
|
118
|
+
sameDay: '[Сегодня, в] LT',
|
119
|
+
nextDay: '[Завтра, в] LT',
|
120
|
+
lastDay: '[Вчера, в] LT',
|
121
|
+
nextWeek: function (now) {
|
122
|
+
if (now.week() !== this.week()) {
|
123
|
+
switch (this.day()) {
|
124
|
+
case 0:
|
125
|
+
return '[В следующее] dddd, [в] LT';
|
126
|
+
case 1:
|
127
|
+
case 2:
|
128
|
+
case 4:
|
129
|
+
return '[В следующий] dddd, [в] LT';
|
130
|
+
case 3:
|
131
|
+
case 5:
|
132
|
+
case 6:
|
133
|
+
return '[В следующую] dddd, [в] LT';
|
134
|
+
}
|
135
|
+
} else {
|
136
|
+
if (this.day() === 2) {
|
137
|
+
return '[Во] dddd, [в] LT';
|
138
|
+
} else {
|
139
|
+
return '[В] dddd, [в] LT';
|
140
|
+
}
|
97
141
|
}
|
98
|
-
}
|
99
|
-
|
100
|
-
|
142
|
+
},
|
143
|
+
lastWeek: function (now) {
|
144
|
+
if (now.week() !== this.week()) {
|
145
|
+
switch (this.day()) {
|
146
|
+
case 0:
|
147
|
+
return '[В прошлое] dddd, [в] LT';
|
148
|
+
case 1:
|
149
|
+
case 2:
|
150
|
+
case 4:
|
151
|
+
return '[В прошлый] dddd, [в] LT';
|
152
|
+
case 3:
|
153
|
+
case 5:
|
154
|
+
case 6:
|
155
|
+
return '[В прошлую] dddd, [в] LT';
|
156
|
+
}
|
101
157
|
} else {
|
102
|
-
|
158
|
+
if (this.day() === 2) {
|
159
|
+
return '[Во] dddd, [в] LT';
|
160
|
+
} else {
|
161
|
+
return '[В] dddd, [в] LT';
|
162
|
+
}
|
103
163
|
}
|
104
|
-
}
|
164
|
+
},
|
165
|
+
sameElse: 'L',
|
105
166
|
},
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
167
|
+
relativeTime: {
|
168
|
+
future: 'через %s',
|
169
|
+
past: '%s назад',
|
170
|
+
s: 'несколько секунд',
|
171
|
+
ss: relativeTimeWithPlural,
|
172
|
+
m: relativeTimeWithPlural,
|
173
|
+
mm: relativeTimeWithPlural,
|
174
|
+
h: 'час',
|
175
|
+
hh: relativeTimeWithPlural,
|
176
|
+
d: 'день',
|
177
|
+
dd: relativeTimeWithPlural,
|
178
|
+
w: 'неделя',
|
179
|
+
ww: relativeTimeWithPlural,
|
180
|
+
M: 'месяц',
|
181
|
+
MM: relativeTimeWithPlural,
|
182
|
+
y: 'год',
|
183
|
+
yy: relativeTimeWithPlural,
|
184
|
+
},
|
185
|
+
meridiemParse: /ночи|утра|дня|вечера/i,
|
186
|
+
isPM: function (input) {
|
187
|
+
return /^(дня|вечера)$/.test(input);
|
188
|
+
},
|
189
|
+
meridiem: function (hour, minute, isLower) {
|
190
|
+
if (hour < 4) {
|
191
|
+
return 'ночи';
|
192
|
+
} else if (hour < 12) {
|
193
|
+
return 'утра';
|
194
|
+
} else if (hour < 17) {
|
195
|
+
return 'дня';
|
120
196
|
} else {
|
121
|
-
|
122
|
-
return '[Во] dddd [в] LT';
|
123
|
-
} else {
|
124
|
-
return '[В] dddd [в] LT';
|
125
|
-
}
|
197
|
+
return 'вечера';
|
126
198
|
}
|
127
199
|
},
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
},
|
150
|
-
meridiem : function (hour, minute, isLower) {
|
151
|
-
if (hour < 4) {
|
152
|
-
return 'ночи';
|
153
|
-
} else if (hour < 12) {
|
154
|
-
return 'утра';
|
155
|
-
} else if (hour < 17) {
|
156
|
-
return 'дня';
|
157
|
-
} else {
|
158
|
-
return 'вечера';
|
159
|
-
}
|
160
|
-
},
|
161
|
-
dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
|
162
|
-
ordinal: function (number, period) {
|
163
|
-
switch (period) {
|
164
|
-
case 'M':
|
165
|
-
case 'd':
|
166
|
-
case 'DDD':
|
167
|
-
return number + '-й';
|
168
|
-
case 'D':
|
169
|
-
return number + '-го';
|
170
|
-
case 'w':
|
171
|
-
case 'W':
|
172
|
-
return number + '-я';
|
173
|
-
default:
|
174
|
-
return number;
|
175
|
-
}
|
176
|
-
},
|
177
|
-
week : {
|
178
|
-
dow : 1, // Monday is the first day of the week.
|
179
|
-
doy : 4 // The week that contains Jan 4th is the first week of the year.
|
180
|
-
}
|
181
|
-
});
|
200
|
+
dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
|
201
|
+
ordinal: function (number, period) {
|
202
|
+
switch (period) {
|
203
|
+
case 'M':
|
204
|
+
case 'd':
|
205
|
+
case 'DDD':
|
206
|
+
return number + '-й';
|
207
|
+
case 'D':
|
208
|
+
return number + '-го';
|
209
|
+
case 'w':
|
210
|
+
case 'W':
|
211
|
+
return number + '-я';
|
212
|
+
default:
|
213
|
+
return number;
|
214
|
+
}
|
215
|
+
},
|
216
|
+
week: {
|
217
|
+
dow: 1, // Monday is the first day of the week.
|
218
|
+
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
219
|
+
},
|
220
|
+
});
|
182
221
|
|
183
|
-
return ru;
|
222
|
+
return ru;
|
184
223
|
|
185
224
|
})));
|