summaryrefslogtreecommitdiffstats
path: root/js/vendor/momentjs/locale/uk.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendor/momentjs/locale/uk.js')
-rw-r--r--js/vendor/momentjs/locale/uk.js69
1 files changed, 26 insertions, 43 deletions
diff --git a/js/vendor/momentjs/locale/uk.js b/js/vendor/momentjs/locale/uk.js
index 84e11ceac..80c34973c 100644
--- a/js/vendor/momentjs/locale/uk.js
+++ b/js/vendor/momentjs/locale/uk.js
@@ -1,26 +1,24 @@
-// moment.js locale configuration
-// locale : ukrainian (uk)
-// author : zemlanin : https://github.com/zemlanin
-// Author : Menelion Elensúle : https://github.com/Oire
+//! moment.js locale configuration
+//! locale : ukrainian (uk)
+//! author : zemlanin : https://github.com/zemlanin
+//! Author : Menelion Elensúle : https://github.com/Oire
+
+;(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined'
+ && typeof require === 'function' ? factory(require('../moment')) :
+ typeof define === 'function' && define.amd ? define(['moment'], factory) :
+ factory(global.moment)
+}(this, function (moment) { 'use strict';
+
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
- }
-}(function (moment) {
function plural(word, num) {
var forms = word.split('_');
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]);
}
-
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
- 'mm': 'хвилина_хвилини_хвилин',
- 'hh': 'година_години_годин',
+ 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
+ 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
'dd': 'день_дні_днів',
'MM': 'місяць_місяці_місяців',
'yy': 'рік_роки_років'
@@ -35,55 +33,41 @@
return number + ' ' + plural(format[key], +number);
}
}
-
- function monthsCaseReplace(m, format) {
- var months = {
- 'nominative': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_'),
- 'accusative': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_')
- },
-
- nounCase = (/D[oD]? *MMMM?/).test(format) ?
- 'accusative' :
- 'nominative';
-
- return months[nounCase][m.month()];
- }
-
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
},
-
nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
'accusative' :
((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
'genitive' :
'nominative');
-
return weekdays[nounCase][m.day()];
}
-
function processHoursFunction(str) {
return function () {
return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
};
}
- return moment.defineLocale('uk', {
- months : monthsCaseReplace,
+ var uk = moment.defineLocale('uk', {
+ months : {
+ 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
+ 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
+ },
monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
weekdays : weekdaysCaseReplace,
weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat : {
LT : 'HH:mm',
- LTS : 'LT:ss',
+ LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY р.',
- LLL : 'D MMMM YYYY р., LT',
- LLLL : 'dddd, D MMMM YYYY р., LT'
+ LLL : 'D MMMM YYYY р., HH:mm',
+ LLLL : 'dddd, D MMMM YYYY р., HH:mm'
},
calendar : {
sameDay: processHoursFunction('[Сьогодні '),
@@ -120,9 +104,7 @@
y : 'рік',
yy : relativeTimeWithPlural
},
-
// M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
-
meridiemParse: /ночі|ранку|дня|вечора/,
isPM: function (input) {
return /^(дня|вечора)$/.test(input);
@@ -138,7 +120,6 @@
return 'вечора';
}
},
-
ordinalParse: /\d{1,2}-(й|го)/,
ordinal: function (number, period) {
switch (period) {
@@ -154,10 +135,12 @@
return number;
}
},
-
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return uk;
+
+})); \ No newline at end of file