2016-02-06 04:42:48 +08:00
|
|
|
|
//! moment.js locale configuration
|
2020-11-11 09:34:26 +08:00
|
|
|
|
//! locale : Serbian Cyrillic [sr-cyrl]
|
|
|
|
|
//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
|
|
|
|
|
//! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic
|
2016-02-06 04:42:48 +08:00
|
|
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
2017-04-20 12:24:20 +08:00
|
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
2016-02-06 04:42:48 +08:00
|
|
|
|
factory(global.moment)
|
2017-04-20 12:24:20 +08:00
|
|
|
|
}(this, (function (moment) { 'use strict';
|
2016-02-06 04:42:48 +08:00
|
|
|
|
|
2020-11-11 09:34:26 +08:00
|
|
|
|
//! moment.js locale configuration
|
2014-08-21 02:41:50 +08:00
|
|
|
|
|
2018-04-26 15:15:53 +08:00
|
|
|
|
var translator = {
|
2020-11-11 09:34:26 +08:00
|
|
|
|
words: {
|
|
|
|
|
//Different grammatical cases
|
2018-04-26 15:15:53 +08:00
|
|
|
|
ss: ['секунда', 'секунде', 'секунди'],
|
|
|
|
|
m: ['један минут', 'једне минуте'],
|
|
|
|
|
mm: ['минут', 'минуте', 'минута'],
|
|
|
|
|
h: ['један сат', 'једног сата'],
|
|
|
|
|
hh: ['сат', 'сата', 'сати'],
|
|
|
|
|
dd: ['дан', 'дана', 'дана'],
|
|
|
|
|
MM: ['месец', 'месеца', 'месеци'],
|
2020-11-11 09:34:26 +08:00
|
|
|
|
yy: ['година', 'године', 'година'],
|
2018-04-26 15:15:53 +08:00
|
|
|
|
},
|
|
|
|
|
correctGrammaticalCase: function (number, wordKey) {
|
2020-11-11 09:34:26 +08:00
|
|
|
|
return number === 1
|
|
|
|
|
? wordKey[0]
|
|
|
|
|
: number >= 2 && number <= 4
|
|
|
|
|
? wordKey[1]
|
|
|
|
|
: wordKey[2];
|
2018-04-26 15:15:53 +08:00
|
|
|
|
},
|
|
|
|
|
translate: function (number, withoutSuffix, key) {
|
|
|
|
|
var wordKey = translator.words[key];
|
|
|
|
|
if (key.length === 1) {
|
|
|
|
|
return withoutSuffix ? wordKey[0] : wordKey[1];
|
|
|
|
|
} else {
|
2020-11-11 09:34:26 +08:00
|
|
|
|
return (
|
|
|
|
|
number +
|
|
|
|
|
' ' +
|
|
|
|
|
translator.correctGrammaticalCase(number, wordKey)
|
|
|
|
|
);
|
2018-04-26 15:15:53 +08:00
|
|
|
|
}
|
2020-11-11 09:34:26 +08:00
|
|
|
|
},
|
2018-04-26 15:15:53 +08:00
|
|
|
|
};
|
2014-08-21 02:41:50 +08:00
|
|
|
|
|
2018-04-26 15:15:53 +08:00
|
|
|
|
var srCyrl = moment.defineLocale('sr-cyrl', {
|
2020-11-11 09:34:26 +08:00
|
|
|
|
months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
|
|
|
|
monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
2018-04-26 15:15:53 +08:00
|
|
|
|
monthsParseExact: true,
|
|
|
|
|
weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
|
|
|
|
|
weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
|
|
|
|
|
weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
|
2020-11-11 09:34:26 +08:00
|
|
|
|
weekdaysParseExact: true,
|
2018-04-26 15:15:53 +08:00
|
|
|
|
longDateFormat: {
|
|
|
|
|
LT: 'H:mm',
|
2020-11-11 09:34:26 +08:00
|
|
|
|
LTS: 'H:mm:ss',
|
|
|
|
|
L: 'D. M. YYYY.',
|
|
|
|
|
LL: 'D. MMMM YYYY.',
|
|
|
|
|
LLL: 'D. MMMM YYYY. H:mm',
|
|
|
|
|
LLLL: 'dddd, D. MMMM YYYY. H:mm',
|
2018-04-26 15:15:53 +08:00
|
|
|
|
},
|
|
|
|
|
calendar: {
|
|
|
|
|
sameDay: '[данас у] LT',
|
|
|
|
|
nextDay: '[сутра у] LT',
|
|
|
|
|
nextWeek: function () {
|
|
|
|
|
switch (this.day()) {
|
|
|
|
|
case 0:
|
|
|
|
|
return '[у] [недељу] [у] LT';
|
|
|
|
|
case 3:
|
|
|
|
|
return '[у] [среду] [у] LT';
|
|
|
|
|
case 6:
|
|
|
|
|
return '[у] [суботу] [у] LT';
|
|
|
|
|
case 1:
|
|
|
|
|
case 2:
|
|
|
|
|
case 4:
|
|
|
|
|
case 5:
|
|
|
|
|
return '[у] dddd [у] LT';
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
|
lastDay: '[јуче у] LT',
|
|
|
|
|
lastWeek: function () {
|
2018-04-26 15:15:53 +08:00
|
|
|
|
var lastWeekDays = [
|
|
|
|
|
'[прошле] [недеље] [у] LT',
|
|
|
|
|
'[прошлог] [понедељка] [у] LT',
|
|
|
|
|
'[прошлог] [уторка] [у] LT',
|
|
|
|
|
'[прошле] [среде] [у] LT',
|
|
|
|
|
'[прошлог] [четвртка] [у] LT',
|
|
|
|
|
'[прошлог] [петка] [у] LT',
|
2020-11-11 09:34:26 +08:00
|
|
|
|
'[прошле] [суботе] [у] LT',
|
2018-04-26 15:15:53 +08:00
|
|
|
|
];
|
|
|
|
|
return lastWeekDays[this.day()];
|
|
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
|
sameElse: 'L',
|
2014-08-21 02:41:50 +08:00
|
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
|
relativeTime: {
|
|
|
|
|
future: 'за %s',
|
|
|
|
|
past: 'пре %s',
|
|
|
|
|
s: 'неколико секунди',
|
|
|
|
|
ss: translator.translate,
|
|
|
|
|
m: translator.translate,
|
|
|
|
|
mm: translator.translate,
|
|
|
|
|
h: translator.translate,
|
|
|
|
|
hh: translator.translate,
|
|
|
|
|
d: 'дан',
|
|
|
|
|
dd: translator.translate,
|
|
|
|
|
M: 'месец',
|
|
|
|
|
MM: translator.translate,
|
|
|
|
|
y: 'годину',
|
|
|
|
|
yy: translator.translate,
|
2014-08-21 02:41:50 +08:00
|
|
|
|
},
|
2018-04-26 15:15:53 +08:00
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
2020-11-11 09:34:26 +08:00
|
|
|
|
ordinal: '%d.',
|
|
|
|
|
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.
|
|
|
|
|
},
|
2018-04-26 15:15:53 +08:00
|
|
|
|
});
|
2016-02-06 04:42:48 +08:00
|
|
|
|
|
2018-04-26 15:15:53 +08:00
|
|
|
|
return srCyrl;
|
2016-02-06 04:42:48 +08:00
|
|
|
|
|
2017-04-20 12:24:20 +08:00
|
|
|
|
})));
|