1 //! moment.js locale configuration
3 ;(function (global
, factory
) {
4 typeof exports
=== 'object' && typeof module
!== 'undefined'
5 && typeof require
=== 'function' ? factory(require('../moment')) :
6 typeof define
=== 'function' && define
.amd
? define(['../moment'], factory
) :
8 }(this, (function (moment
) { 'use strict';
11 function plural(word
, num
) {
12 var forms
= word
.split('_');
13 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]);
15 function relativeTimeWithPlural(number
, withoutSuffix
, key
) {
17 'ss': withoutSuffix
? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
18 'mm': withoutSuffix
? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
19 'hh': withoutSuffix
? 'година_години_годин' : 'годину_години_годин',
20 'dd': 'день_дні_днів',
21 'MM': 'місяць_місяці_місяців',
22 'yy': 'рік_роки_років'
25 return withoutSuffix
? 'хвилина' : 'хвилину';
27 else if (key
=== 'h') {
28 return withoutSuffix
? 'година' : 'годину';
31 return number
+ ' ' + plural(format
[key
], +number
);
34 function weekdaysCaseReplace(m
, format
) {
36 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
37 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
38 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
42 return weekdays
['nominative'].slice(1, 7).concat(weekdays
['nominative'].slice(0, 1));
45 return weekdays
['nominative'];
48 var nounCase
= (/(\[[ВвУу]\]) ?dddd/).test(format
) ?
50 ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format
) ?
53 return weekdays
[nounCase
][m
.day()];
55 function processHoursFunction(str
) {
57 return str
+ 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
61 var uk
= moment
.defineLocale('uk', {
63 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
64 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
66 monthsShort
: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
67 weekdays
: weekdaysCaseReplace
,
68 weekdaysShort
: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
69 weekdaysMin
: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
74 LL
: 'D MMMM YYYY р.',
75 LLL
: 'D MMMM YYYY р., HH:mm',
76 LLLL
: 'dddd, D MMMM YYYY р., HH:mm'
79 sameDay
: processHoursFunction('[Сьогодні '),
80 nextDay
: processHoursFunction('[Завтра '),
81 lastDay
: processHoursFunction('[Вчора '),
82 nextWeek
: processHoursFunction('[У] dddd ['),
83 lastWeek: function () {
89 return processHoursFunction('[Минулої] dddd [').call(this);
93 return processHoursFunction('[Минулого] dddd [').call(this);
101 s
: 'декілька секунд',
102 ss
: relativeTimeWithPlural
,
103 m
: relativeTimeWithPlural
,
104 mm
: relativeTimeWithPlural
,
106 hh
: relativeTimeWithPlural
,
108 dd
: relativeTimeWithPlural
,
110 MM
: relativeTimeWithPlural
,
112 yy
: relativeTimeWithPlural
114 // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
115 meridiemParse
: /ночі|ранку|дня|вечора/,
116 isPM: function (input
) {
117 return /^(дня|вечора)$/.test(input
);
119 meridiem : function (hour
, minute
, isLower
) {
122 } else if (hour
< 12) {
124 } else if (hour
< 17) {
130 dayOfMonthOrdinalParse
: /\d{1,2}-(й|го)/,
131 ordinal: function (number
, period
) {
138 return number
+ '-й';
140 return number
+ '-го';
146 dow
: 1, // Monday is the first day of the week.
147 doy
: 7 // The week that contains Jan 7th is the first week of the year.