momentjs-rails 2.15.1 → 2.17.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 +3 -0
- data/test/integration/navigation_test.rb +1 -1
- data/vendor/assets/javascripts/moment.js +3653 -3586
- data/vendor/assets/javascripts/moment/af.js +59 -59
- data/vendor/assets/javascripts/moment/ar-dz.js +59 -0
- data/vendor/assets/javascripts/moment/ar-ly.js +111 -107
- data/vendor/assets/javascripts/moment/ar-ma.js +46 -46
- data/vendor/assets/javascripts/moment/ar-sa.js +90 -89
- data/vendor/assets/javascripts/moment/ar-tn.js +46 -46
- data/vendor/assets/javascripts/moment/ar.js +125 -120
- data/vendor/assets/javascripts/moment/az.js +90 -90
- data/vendor/assets/javascripts/moment/be.js +112 -112
- data/vendor/assets/javascripts/moment/bg.js +74 -74
- data/vendor/assets/javascripts/moment/bn.js +104 -104
- data/vendor/assets/javascripts/moment/bo.js +104 -104
- data/vendor/assets/javascripts/moment/br.js +89 -89
- data/vendor/assets/javascripts/moment/bs.js +125 -125
- data/vendor/assets/javascripts/moment/ca.js +63 -63
- data/vendor/assets/javascripts/moment/cs.js +154 -154
- data/vendor/assets/javascripts/moment/cv.js +49 -49
- data/vendor/assets/javascripts/moment/cy.js +65 -65
- data/vendor/assets/javascripts/moment/da.js +47 -47
- data/vendor/assets/javascripts/moment/de-at.js +62 -62
- data/vendor/assets/javascripts/moment/de.js +62 -62
- data/vendor/assets/javascripts/moment/dv.js +84 -83
- data/vendor/assets/javascripts/moment/el.js +81 -81
- data/vendor/assets/javascripts/moment/en-au.js +54 -54
- data/vendor/assets/javascripts/moment/en-ca.js +50 -50
- data/vendor/assets/javascripts/moment/en-gb.js +54 -54
- data/vendor/assets/javascripts/moment/en-ie.js +54 -54
- data/vendor/assets/javascripts/moment/en-nz.js +54 -54
- data/vendor/assets/javascripts/moment/eo.js +57 -57
- data/vendor/assets/javascripts/moment/es-do.js +63 -63
- data/vendor/assets/javascripts/moment/es.js +63 -63
- data/vendor/assets/javascripts/moment/et.js +64 -64
- data/vendor/assets/javascripts/moment/eu.js +53 -53
- data/vendor/assets/javascripts/moment/fa.js +92 -91
- data/vendor/assets/javascripts/moment/fi.js +92 -92
- data/vendor/assets/javascripts/moment/fo.js +47 -47
- data/vendor/assets/javascripts/moment/fr-ca.js +47 -47
- data/vendor/assets/javascripts/moment/fr-ch.js +51 -51
- data/vendor/assets/javascripts/moment/fr.js +51 -51
- data/vendor/assets/javascripts/moment/fy.js +58 -58
- data/vendor/assets/javascripts/moment/gd.js +58 -58
- data/vendor/assets/javascripts/moment/gl.js +61 -61
- data/vendor/assets/javascripts/moment/he.js +78 -78
- data/vendor/assets/javascripts/moment/hi.js +109 -109
- data/vendor/assets/javascripts/moment/hr.js +128 -128
- data/vendor/assets/javascripts/moment/hu.js +92 -92
- data/vendor/assets/javascripts/moment/hy-am.js +79 -79
- data/vendor/assets/javascripts/moment/id.js +68 -68
- data/vendor/assets/javascripts/moment/is.js +106 -106
- data/vendor/assets/javascripts/moment/it.js +54 -54
- data/vendor/assets/javascripts/moment/ja.js +62 -62
- data/vendor/assets/javascripts/moment/jv.js +69 -69
- data/vendor/assets/javascripts/moment/ka.js +71 -71
- data/vendor/assets/javascripts/moment/kk.js +73 -73
- data/vendor/assets/javascripts/moment/km.js +45 -45
- data/vendor/assets/javascripts/moment/ko.js +51 -51
- data/vendor/assets/javascripts/moment/ky.js +73 -73
- data/vendor/assets/javascripts/moment/lb.js +114 -114
- data/vendor/assets/javascripts/moment/lo.js +56 -56
- data/vendor/assets/javascripts/moment/lt.js +100 -100
- data/vendor/assets/javascripts/moment/lv.js +81 -81
- data/vendor/assets/javascripts/moment/me.js +93 -93
- data/vendor/assets/javascripts/moment/mi.js +51 -51
- data/vendor/assets/javascripts/moment/mk.js +74 -74
- data/vendor/assets/javascripts/moment/ml.js +67 -67
- data/vendor/assets/javascripts/moment/mr.js +139 -139
- data/vendor/assets/javascripts/moment/ms-my.js +68 -68
- data/vendor/assets/javascripts/moment/ms.js +68 -68
- data/vendor/assets/javascripts/moment/my.js +79 -78
- data/vendor/assets/javascripts/moment/nb.js +49 -49
- data/vendor/assets/javascripts/moment/ne.js +108 -108
- data/vendor/assets/javascripts/moment/nl-be.js +86 -0
- data/vendor/assets/javascripts/moment/nl.js +67 -67
- data/vendor/assets/javascripts/moment/nn.js +47 -47
- data/vendor/assets/javascripts/moment/pa-in.js +109 -109
- data/vendor/assets/javascripts/moment/pl.js +88 -88
- data/vendor/assets/javascripts/moment/pt-br.js +47 -47
- data/vendor/assets/javascripts/moment/pt.js +51 -51
- data/vendor/assets/javascripts/moment/ro.js +59 -59
- data/vendor/assets/javascripts/moment/ru.js +153 -153
- data/vendor/assets/javascripts/moment/se.js +47 -47
- data/vendor/assets/javascripts/moment/si.js +57 -57
- data/vendor/assets/javascripts/moment/sk.js +132 -132
- data/vendor/assets/javascripts/moment/sl.js +144 -144
- data/vendor/assets/javascripts/moment/sq.js +55 -55
- data/vendor/assets/javascripts/moment/sr-cyrl.js +93 -93
- data/vendor/assets/javascripts/moment/sr.js +93 -93
- data/vendor/assets/javascripts/moment/ss.js +73 -73
- data/vendor/assets/javascripts/moment/sv.js +56 -56
- data/vendor/assets/javascripts/moment/sw.js +46 -46
- data/vendor/assets/javascripts/moment/ta.js +115 -114
- data/vendor/assets/javascripts/moment/te.js +75 -75
- data/vendor/assets/javascripts/moment/tet.js +68 -0
- data/vendor/assets/javascripts/moment/th.js +53 -53
- data/vendor/assets/javascripts/moment/tl-ph.js +49 -49
- data/vendor/assets/javascripts/moment/tlh.js +100 -100
- data/vendor/assets/javascripts/moment/tr.js +74 -74
- data/vendor/assets/javascripts/moment/tzl.js +75 -75
- data/vendor/assets/javascripts/moment/tzm-latn.js +45 -45
- data/vendor/assets/javascripts/moment/tzm.js +45 -45
- data/vendor/assets/javascripts/moment/uk.js +125 -125
- data/vendor/assets/javascripts/moment/uz.js +45 -45
- data/vendor/assets/javascripts/moment/vi.js +65 -65
- data/vendor/assets/javascripts/moment/x-pseudo.js +55 -55
- data/vendor/assets/javascripts/moment/yo.js +60 -0
- data/vendor/assets/javascripts/moment/zh-cn.js +107 -107
- data/vendor/assets/javascripts/moment/zh-hk.js +89 -89
- data/vendor/assets/javascripts/moment/zh-tw.js +89 -89
- metadata +6 -2
@@ -7,55 +7,55 @@
|
|
7
7
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
9
9
|
factory(global.moment)
|
10
|
-
}(this, function (moment) { 'use strict';
|
10
|
+
}(this, (function (moment) { 'use strict';
|
11
11
|
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
13
|
+
var ptBr = moment.defineLocale('pt-br', {
|
14
|
+
months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
|
15
|
+
monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
|
16
|
+
weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
|
17
|
+
weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
|
18
|
+
weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
|
19
|
+
weekdaysParseExact : true,
|
20
|
+
longDateFormat : {
|
21
|
+
LT : 'HH:mm',
|
22
|
+
LTS : 'HH:mm:ss',
|
23
|
+
L : 'DD/MM/YYYY',
|
24
|
+
LL : 'D [de] MMMM [de] YYYY',
|
25
|
+
LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',
|
26
|
+
LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
|
27
|
+
},
|
28
|
+
calendar : {
|
29
|
+
sameDay: '[Hoje às] LT',
|
30
|
+
nextDay: '[Amanhã às] LT',
|
31
|
+
nextWeek: 'dddd [às] LT',
|
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
|
27
37
|
},
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
d : 'um dia',
|
49
|
-
dd : '%d dias',
|
50
|
-
M : 'um mês',
|
51
|
-
MM : '%d meses',
|
52
|
-
y : 'um ano',
|
53
|
-
yy : '%d anos'
|
54
|
-
},
|
55
|
-
ordinalParse: /\d{1,2}º/,
|
56
|
-
ordinal : '%dº'
|
57
|
-
});
|
38
|
+
sameElse: 'L'
|
39
|
+
},
|
40
|
+
relativeTime : {
|
41
|
+
future : 'em %s',
|
42
|
+
past : '%s atrás',
|
43
|
+
s : 'poucos segundos',
|
44
|
+
m : 'um minuto',
|
45
|
+
mm : '%d minutos',
|
46
|
+
h : 'uma hora',
|
47
|
+
hh : '%d horas',
|
48
|
+
d : 'um dia',
|
49
|
+
dd : '%d dias',
|
50
|
+
M : 'um mês',
|
51
|
+
MM : '%d meses',
|
52
|
+
y : 'um ano',
|
53
|
+
yy : '%d anos'
|
54
|
+
},
|
55
|
+
ordinalParse: /\d{1,2}º/,
|
56
|
+
ordinal : '%dº'
|
57
|
+
});
|
58
58
|
|
59
|
-
|
59
|
+
return ptBr;
|
60
60
|
|
61
|
-
}));
|
61
|
+
})));
|
@@ -7,59 +7,59 @@
|
|
7
7
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
8
8
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
9
9
|
factory(global.moment)
|
10
|
-
}(this, function (moment) { 'use strict';
|
10
|
+
}(this, (function (moment) { 'use strict';
|
11
11
|
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
13
|
+
var pt = moment.defineLocale('pt', {
|
14
|
+
months : 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
|
15
|
+
monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
|
16
|
+
weekdays : 'Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado'.split('_'),
|
17
|
+
weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
|
18
|
+
weekdaysMin : 'Dom_2ª_3ª_4ª_5ª_6ª_Sáb'.split('_'),
|
19
|
+
weekdaysParseExact : true,
|
20
|
+
longDateFormat : {
|
21
|
+
LT : 'HH:mm',
|
22
|
+
LTS : 'HH:mm:ss',
|
23
|
+
L : 'DD/MM/YYYY',
|
24
|
+
LL : 'D [de] MMMM [de] YYYY',
|
25
|
+
LLL : 'D [de] MMMM [de] YYYY HH:mm',
|
26
|
+
LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm'
|
27
|
+
},
|
28
|
+
calendar : {
|
29
|
+
sameDay: '[Hoje às] LT',
|
30
|
+
nextDay: '[Amanhã às] LT',
|
31
|
+
nextWeek: 'dddd [às] LT',
|
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
|
27
37
|
},
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
y : 'um ano',
|
53
|
-
yy : '%d anos'
|
54
|
-
},
|
55
|
-
ordinalParse: /\d{1,2}º/,
|
56
|
-
ordinal : '%dº',
|
57
|
-
week : {
|
58
|
-
dow : 1, // Monday is the first day of the week.
|
59
|
-
doy : 4 // The week that contains Jan 4th is the first week of the year.
|
60
|
-
}
|
61
|
-
});
|
38
|
+
sameElse: 'L'
|
39
|
+
},
|
40
|
+
relativeTime : {
|
41
|
+
future : 'em %s',
|
42
|
+
past : 'há %s',
|
43
|
+
s : 'segundos',
|
44
|
+
m : 'um minuto',
|
45
|
+
mm : '%d minutos',
|
46
|
+
h : 'uma hora',
|
47
|
+
hh : '%d horas',
|
48
|
+
d : 'um dia',
|
49
|
+
dd : '%d dias',
|
50
|
+
M : 'um mês',
|
51
|
+
MM : '%d meses',
|
52
|
+
y : 'um ano',
|
53
|
+
yy : '%d anos'
|
54
|
+
},
|
55
|
+
ordinalParse: /\d{1,2}º/,
|
56
|
+
ordinal : '%dº',
|
57
|
+
week : {
|
58
|
+
dow : 1, // Monday is the first day of the week.
|
59
|
+
doy : 4 // The week that contains Jan 4th is the first week of the year.
|
60
|
+
}
|
61
|
+
});
|
62
62
|
|
63
|
-
|
63
|
+
return pt;
|
64
64
|
|
65
|
-
}));
|
65
|
+
})));
|
@@ -8,68 +8,68 @@
|
|
8
8
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
9
9
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
10
10
|
factory(global.moment)
|
11
|
-
}(this, function (moment) { 'use strict';
|
11
|
+
}(this, (function (moment) { 'use strict';
|
12
12
|
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
}
|
26
|
-
return number + separator + format[key];
|
14
|
+
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
15
|
+
var format = {
|
16
|
+
'mm': 'minute',
|
17
|
+
'hh': 'ore',
|
18
|
+
'dd': 'zile',
|
19
|
+
'MM': 'luni',
|
20
|
+
'yy': 'ani'
|
21
|
+
},
|
22
|
+
separator = ' ';
|
23
|
+
if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
|
24
|
+
separator = ' de ';
|
27
25
|
}
|
26
|
+
return number + separator + format[key];
|
27
|
+
}
|
28
28
|
|
29
|
-
|
30
|
-
|
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
|
-
|
29
|
+
var ro = moment.defineLocale('ro', {
|
30
|
+
months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
|
31
|
+
monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
|
32
|
+
monthsParseExact: true,
|
33
|
+
weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
|
34
|
+
weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
|
35
|
+
weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
|
36
|
+
longDateFormat : {
|
37
|
+
LT : 'H:mm',
|
38
|
+
LTS : 'H:mm:ss',
|
39
|
+
L : 'DD.MM.YYYY',
|
40
|
+
LL : 'D MMMM YYYY',
|
41
|
+
LLL : 'D MMMM YYYY H:mm',
|
42
|
+
LLLL : 'dddd, D MMMM YYYY H:mm'
|
43
|
+
},
|
44
|
+
calendar : {
|
45
|
+
sameDay: '[azi la] LT',
|
46
|
+
nextDay: '[mâine la] LT',
|
47
|
+
nextWeek: 'dddd [la] LT',
|
48
|
+
lastDay: '[ieri la] LT',
|
49
|
+
lastWeek: '[fosta] dddd [la] LT',
|
50
|
+
sameElse: 'L'
|
51
|
+
},
|
52
|
+
relativeTime : {
|
53
|
+
future : 'peste %s',
|
54
|
+
past : '%s în urmă',
|
55
|
+
s : 'câteva secunde',
|
56
|
+
m : 'un minut',
|
57
|
+
mm : relativeTimeWithPlural,
|
58
|
+
h : 'o oră',
|
59
|
+
hh : relativeTimeWithPlural,
|
60
|
+
d : 'o zi',
|
61
|
+
dd : relativeTimeWithPlural,
|
62
|
+
M : 'o lună',
|
63
|
+
MM : relativeTimeWithPlural,
|
64
|
+
y : 'un an',
|
65
|
+
yy : relativeTimeWithPlural
|
66
|
+
},
|
67
|
+
week : {
|
68
|
+
dow : 1, // Monday is the first day of the week.
|
69
|
+
doy : 7 // The week that contains Jan 1st is the first week of the year.
|
70
|
+
}
|
71
|
+
});
|
72
72
|
|
73
|
-
|
73
|
+
return ro;
|
74
74
|
|
75
|
-
}));
|
75
|
+
})));
|
@@ -9,175 +9,175 @@
|
|
9
9
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
10
10
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
11
11
|
factory(global.moment)
|
12
|
-
}(this, function (moment) { 'use strict';
|
12
|
+
}(this, (function (moment) { 'use strict';
|
13
13
|
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
function plural(word, num) {
|
16
|
+
var forms = word.split('_');
|
17
|
+
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
|
18
|
+
}
|
19
|
+
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
20
|
+
var format = {
|
21
|
+
'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
|
22
|
+
'hh': 'час_часа_часов',
|
23
|
+
'dd': 'день_дня_дней',
|
24
|
+
'MM': 'месяц_месяца_месяцев',
|
25
|
+
'yy': 'год_года_лет'
|
26
|
+
};
|
27
|
+
if (key === 'm') {
|
28
|
+
return withoutSuffix ? 'минута' : 'минуту';
|
18
29
|
}
|
19
|
-
|
20
|
-
|
21
|
-
'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
|
22
|
-
'hh': 'час_часа_часов',
|
23
|
-
'dd': 'день_дня_дней',
|
24
|
-
'MM': 'месяц_месяца_месяцев',
|
25
|
-
'yy': 'год_года_лет'
|
26
|
-
};
|
27
|
-
if (key === 'm') {
|
28
|
-
return withoutSuffix ? 'минута' : 'минуту';
|
29
|
-
}
|
30
|
-
else {
|
31
|
-
return number + ' ' + plural(format[key], +number);
|
32
|
-
}
|
30
|
+
else {
|
31
|
+
return number + ' ' + plural(format[key], +number);
|
33
32
|
}
|
34
|
-
|
33
|
+
}
|
34
|
+
var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
36
|
+
// http://new.gramota.ru/spravka/rules/139-prop : § 103
|
37
|
+
// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
|
38
|
+
// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
|
39
|
+
var ru = moment.defineLocale('ru', {
|
40
|
+
months : {
|
41
|
+
format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
|
42
|
+
standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
|
43
|
+
},
|
44
|
+
monthsShort : {
|
45
|
+
// по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
|
46
|
+
format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
|
47
|
+
standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
|
48
|
+
},
|
49
|
+
weekdays : {
|
50
|
+
standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
|
51
|
+
format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
|
52
|
+
isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
|
53
|
+
},
|
54
|
+
weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
|
55
|
+
weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
|
56
|
+
monthsParse : monthsParse,
|
57
|
+
longMonthsParse : monthsParse,
|
58
|
+
shortMonthsParse : monthsParse,
|
59
59
|
|
60
|
-
|
61
|
-
|
60
|
+
// полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
|
61
|
+
monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
|
62
62
|
|
63
|
-
|
64
|
-
|
63
|
+
// копия предыдущего
|
64
|
+
monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
|
65
65
|
|
66
|
-
|
67
|
-
|
66
|
+
// полные названия с падежами
|
67
|
+
monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
|
68
68
|
|
69
|
-
|
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
|
-
}
|
97
|
-
} else {
|
98
|
-
if (this.day() === 2) {
|
99
|
-
return '[Во] dddd [в] LT';
|
100
|
-
} else {
|
101
|
-
return '[В] dddd [в] LT';
|
102
|
-
}
|
69
|
+
// Выражение, которое соотвествует только сокращённым формам
|
70
|
+
monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
|
71
|
+
longDateFormat : {
|
72
|
+
LT : 'HH:mm',
|
73
|
+
LTS : 'HH:mm:ss',
|
74
|
+
L : 'DD.MM.YYYY',
|
75
|
+
LL : 'D MMMM YYYY г.',
|
76
|
+
LLL : 'D MMMM YYYY г., HH:mm',
|
77
|
+
LLLL : 'dddd, D MMMM YYYY г., HH:mm'
|
78
|
+
},
|
79
|
+
calendar : {
|
80
|
+
sameDay: '[Сегодня в] LT',
|
81
|
+
nextDay: '[Завтра в] LT',
|
82
|
+
lastDay: '[Вчера в] LT',
|
83
|
+
nextWeek: function (now) {
|
84
|
+
if (now.week() !== this.week()) {
|
85
|
+
switch (this.day()) {
|
86
|
+
case 0:
|
87
|
+
return '[В следующее] dddd [в] LT';
|
88
|
+
case 1:
|
89
|
+
case 2:
|
90
|
+
case 4:
|
91
|
+
return '[В следующий] dddd [в] LT';
|
92
|
+
case 3:
|
93
|
+
case 5:
|
94
|
+
case 6:
|
95
|
+
return '[В следующую] dddd [в] LT';
|
103
96
|
}
|
104
|
-
}
|
105
|
-
|
106
|
-
|
107
|
-
switch (this.day()) {
|
108
|
-
case 0:
|
109
|
-
return '[В прошлое] dddd [в] LT';
|
110
|
-
case 1:
|
111
|
-
case 2:
|
112
|
-
case 4:
|
113
|
-
return '[В прошлый] dddd [в] LT';
|
114
|
-
case 3:
|
115
|
-
case 5:
|
116
|
-
case 6:
|
117
|
-
return '[В прошлую] dddd [в] LT';
|
118
|
-
}
|
97
|
+
} else {
|
98
|
+
if (this.day() === 2) {
|
99
|
+
return '[Во] dddd [в] LT';
|
119
100
|
} else {
|
120
|
-
|
121
|
-
return '[Во] dddd [в] LT';
|
122
|
-
} else {
|
123
|
-
return '[В] dddd [в] LT';
|
124
|
-
}
|
101
|
+
return '[В] dddd [в] LT';
|
125
102
|
}
|
126
|
-
},
|
127
|
-
sameElse: 'L'
|
128
|
-
},
|
129
|
-
relativeTime : {
|
130
|
-
future : 'через %s',
|
131
|
-
past : '%s назад',
|
132
|
-
s : 'несколько секунд',
|
133
|
-
m : relativeTimeWithPlural,
|
134
|
-
mm : relativeTimeWithPlural,
|
135
|
-
h : 'час',
|
136
|
-
hh : relativeTimeWithPlural,
|
137
|
-
d : 'день',
|
138
|
-
dd : relativeTimeWithPlural,
|
139
|
-
M : 'месяц',
|
140
|
-
MM : relativeTimeWithPlural,
|
141
|
-
y : 'год',
|
142
|
-
yy : relativeTimeWithPlural
|
143
|
-
},
|
144
|
-
meridiemParse: /ночи|утра|дня|вечера/i,
|
145
|
-
isPM : function (input) {
|
146
|
-
return /^(дня|вечера)$/.test(input);
|
147
|
-
},
|
148
|
-
meridiem : function (hour, minute, isLower) {
|
149
|
-
if (hour < 4) {
|
150
|
-
return 'ночи';
|
151
|
-
} else if (hour < 12) {
|
152
|
-
return 'утра';
|
153
|
-
} else if (hour < 17) {
|
154
|
-
return 'дня';
|
155
|
-
} else {
|
156
|
-
return 'вечера';
|
157
103
|
}
|
158
104
|
},
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
105
|
+
lastWeek: function (now) {
|
106
|
+
if (now.week() !== this.week()) {
|
107
|
+
switch (this.day()) {
|
108
|
+
case 0:
|
109
|
+
return '[В прошлое] dddd [в] LT';
|
110
|
+
case 1:
|
111
|
+
case 2:
|
112
|
+
case 4:
|
113
|
+
return '[В прошлый] dddd [в] LT';
|
114
|
+
case 3:
|
115
|
+
case 5:
|
116
|
+
case 6:
|
117
|
+
return '[В прошлую] dddd [в] LT';
|
118
|
+
}
|
119
|
+
} else {
|
120
|
+
if (this.day() === 2) {
|
121
|
+
return '[Во] dddd [в] LT';
|
122
|
+
} else {
|
123
|
+
return '[В] dddd [в] LT';
|
124
|
+
}
|
173
125
|
}
|
174
126
|
},
|
175
|
-
|
176
|
-
|
177
|
-
|
127
|
+
sameElse: 'L'
|
128
|
+
},
|
129
|
+
relativeTime : {
|
130
|
+
future : 'через %s',
|
131
|
+
past : '%s назад',
|
132
|
+
s : 'несколько секунд',
|
133
|
+
m : relativeTimeWithPlural,
|
134
|
+
mm : relativeTimeWithPlural,
|
135
|
+
h : 'час',
|
136
|
+
hh : relativeTimeWithPlural,
|
137
|
+
d : 'день',
|
138
|
+
dd : relativeTimeWithPlural,
|
139
|
+
M : 'месяц',
|
140
|
+
MM : relativeTimeWithPlural,
|
141
|
+
y : 'год',
|
142
|
+
yy : relativeTimeWithPlural
|
143
|
+
},
|
144
|
+
meridiemParse: /ночи|утра|дня|вечера/i,
|
145
|
+
isPM : function (input) {
|
146
|
+
return /^(дня|вечера)$/.test(input);
|
147
|
+
},
|
148
|
+
meridiem : function (hour, minute, isLower) {
|
149
|
+
if (hour < 4) {
|
150
|
+
return 'ночи';
|
151
|
+
} else if (hour < 12) {
|
152
|
+
return 'утра';
|
153
|
+
} else if (hour < 17) {
|
154
|
+
return 'дня';
|
155
|
+
} else {
|
156
|
+
return 'вечера';
|
178
157
|
}
|
179
|
-
}
|
158
|
+
},
|
159
|
+
ordinalParse: /\d{1,2}-(й|го|я)/,
|
160
|
+
ordinal: function (number, period) {
|
161
|
+
switch (period) {
|
162
|
+
case 'M':
|
163
|
+
case 'd':
|
164
|
+
case 'DDD':
|
165
|
+
return number + '-й';
|
166
|
+
case 'D':
|
167
|
+
return number + '-го';
|
168
|
+
case 'w':
|
169
|
+
case 'W':
|
170
|
+
return number + '-я';
|
171
|
+
default:
|
172
|
+
return number;
|
173
|
+
}
|
174
|
+
},
|
175
|
+
week : {
|
176
|
+
dow : 1, // Monday is the first day of the week.
|
177
|
+
doy : 7 // The week that contains Jan 1st is the first week of the year.
|
178
|
+
}
|
179
|
+
});
|
180
180
|
|
181
|
-
|
181
|
+
return ru;
|
182
182
|
|
183
|
-
}));
|
183
|
+
})));
|