2019-06-10 17:38:54 +02:00
|
|
|
//! moment.js locale configuration
|
2020-07-23 23:12:30 +02:00
|
|
|
//! locale : Slovenian [sl]
|
|
|
|
//! author : Robert Sedovšek : https://github.com/sedovsek
|
2019-06-10 17:38:54 +02:00
|
|
|
|
|
|
|
;(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';
|
|
|
|
|
2020-07-23 23:12:30 +02:00
|
|
|
//! moment.js locale configuration
|
2019-06-10 17:38:54 +02:00
|
|
|
|
|
|
|
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
|
|
|
var result = number + ' ';
|
|
|
|
switch (key) {
|
|
|
|
case 's':
|
2020-07-23 23:12:30 +02:00
|
|
|
return withoutSuffix || isFuture
|
|
|
|
? 'nekaj sekund'
|
|
|
|
: 'nekaj sekundami';
|
2019-06-10 17:38:54 +02:00
|
|
|
case 'ss':
|
|
|
|
if (number === 1) {
|
|
|
|
result += withoutSuffix ? 'sekundo' : 'sekundi';
|
|
|
|
} else if (number === 2) {
|
|
|
|
result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
|
|
|
|
} else {
|
|
|
|
result += 'sekund';
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
case 'm':
|
|
|
|
return withoutSuffix ? 'ena minuta' : 'eno minuto';
|
|
|
|
case 'mm':
|
|
|
|
if (number === 1) {
|
|
|
|
result += withoutSuffix ? 'minuta' : 'minuto';
|
|
|
|
} else if (number === 2) {
|
|
|
|
result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'minute' : 'minutami';
|
|
|
|
} else {
|
|
|
|
result += withoutSuffix || isFuture ? 'minut' : 'minutami';
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
case 'h':
|
|
|
|
return withoutSuffix ? 'ena ura' : 'eno uro';
|
|
|
|
case 'hh':
|
|
|
|
if (number === 1) {
|
|
|
|
result += withoutSuffix ? 'ura' : 'uro';
|
|
|
|
} else if (number === 2) {
|
|
|
|
result += withoutSuffix || isFuture ? 'uri' : 'urama';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'ure' : 'urami';
|
|
|
|
} else {
|
|
|
|
result += withoutSuffix || isFuture ? 'ur' : 'urami';
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
case 'd':
|
|
|
|
return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
|
|
|
|
case 'dd':
|
|
|
|
if (number === 1) {
|
|
|
|
result += withoutSuffix || isFuture ? 'dan' : 'dnem';
|
|
|
|
} else if (number === 2) {
|
|
|
|
result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
|
|
|
|
} else {
|
|
|
|
result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
case 'M':
|
|
|
|
return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
|
|
|
|
case 'MM':
|
|
|
|
if (number === 1) {
|
|
|
|
result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
|
|
|
|
} else if (number === 2) {
|
|
|
|
result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
|
|
|
|
} else {
|
|
|
|
result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
case 'y':
|
|
|
|
return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
|
|
|
|
case 'yy':
|
|
|
|
if (number === 1) {
|
|
|
|
result += withoutSuffix || isFuture ? 'leto' : 'letom';
|
|
|
|
} else if (number === 2) {
|
|
|
|
result += withoutSuffix || isFuture ? 'leti' : 'letoma';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'leta' : 'leti';
|
|
|
|
} else {
|
|
|
|
result += withoutSuffix || isFuture ? 'let' : 'leti';
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var sl = moment.defineLocale('sl', {
|
2020-07-23 23:12:30 +02:00
|
|
|
months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
|
|
|
|
'_'
|
|
|
|
),
|
2019-06-10 17:38:54 +02:00
|
|
|
monthsParseExact: true,
|
2020-07-23 23:12:30 +02:00
|
|
|
weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
|
|
|
|
weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
|
|
|
|
weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
|
|
|
|
weekdaysParseExact: true,
|
|
|
|
longDateFormat: {
|
|
|
|
LT: 'H:mm',
|
|
|
|
LTS: 'H:mm:ss',
|
|
|
|
L: 'DD. MM. YYYY',
|
|
|
|
LL: 'D. MMMM YYYY',
|
|
|
|
LLL: 'D. MMMM YYYY H:mm',
|
|
|
|
LLLL: 'dddd, D. MMMM YYYY H:mm',
|
2019-06-10 17:38:54 +02:00
|
|
|
},
|
2020-07-23 23:12:30 +02:00
|
|
|
calendar: {
|
|
|
|
sameDay: '[danes ob] LT',
|
|
|
|
nextDay: '[jutri ob] LT',
|
2019-06-10 17:38:54 +02:00
|
|
|
|
2020-07-23 23:12:30 +02:00
|
|
|
nextWeek: function () {
|
2019-06-10 17:38:54 +02:00
|
|
|
switch (this.day()) {
|
|
|
|
case 0:
|
|
|
|
return '[v] [nedeljo] [ob] LT';
|
|
|
|
case 3:
|
|
|
|
return '[v] [sredo] [ob] LT';
|
|
|
|
case 6:
|
|
|
|
return '[v] [soboto] [ob] LT';
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
return '[v] dddd [ob] LT';
|
|
|
|
}
|
|
|
|
},
|
2020-07-23 23:12:30 +02:00
|
|
|
lastDay: '[včeraj ob] LT',
|
|
|
|
lastWeek: function () {
|
2019-06-10 17:38:54 +02:00
|
|
|
switch (this.day()) {
|
|
|
|
case 0:
|
|
|
|
return '[prejšnjo] [nedeljo] [ob] LT';
|
|
|
|
case 3:
|
|
|
|
return '[prejšnjo] [sredo] [ob] LT';
|
|
|
|
case 6:
|
|
|
|
return '[prejšnjo] [soboto] [ob] LT';
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
return '[prejšnji] dddd [ob] LT';
|
|
|
|
}
|
|
|
|
},
|
2020-07-23 23:12:30 +02:00
|
|
|
sameElse: 'L',
|
2019-06-10 17:38:54 +02:00
|
|
|
},
|
2020-07-23 23:12:30 +02:00
|
|
|
relativeTime: {
|
|
|
|
future: 'čez %s',
|
|
|
|
past: 'pred %s',
|
|
|
|
s: processRelativeTime,
|
|
|
|
ss: processRelativeTime,
|
|
|
|
m: processRelativeTime,
|
|
|
|
mm: processRelativeTime,
|
|
|
|
h: processRelativeTime,
|
|
|
|
hh: processRelativeTime,
|
|
|
|
d: processRelativeTime,
|
|
|
|
dd: processRelativeTime,
|
|
|
|
M: processRelativeTime,
|
|
|
|
MM: processRelativeTime,
|
|
|
|
y: processRelativeTime,
|
|
|
|
yy: processRelativeTime,
|
2019-06-10 17:38:54 +02:00
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
2020-07-23 23:12:30 +02:00
|
|
|
ordinal: '%d.',
|
|
|
|
week: {
|
|
|
|
dow: 1, // Monday is the first day of the week.
|
|
|
|
doy: 7, // The week that contains Jan 7th is the first week of the year.
|
|
|
|
},
|
2019-06-10 17:38:54 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
return sl;
|
|
|
|
|
|
|
|
})));
|