2016-02-05 15:42:48 -05:00
|
|
|
//! moment.js locale configuration
|
2017-04-20 00:24:20 -04:00
|
|
|
//! locale : Slovenian [sl]
|
2016-02-05 15:42:48 -05:00
|
|
|
//! author : Robert Sedovšek : https://github.com/sedovsek
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2016-02-05 15:42:48 -05:00
|
|
|
;(function (global, factory) {
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
2017-04-20 00:24:20 -04:00
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
2016-02-05 15:42:48 -05:00
|
|
|
factory(global.moment)
|
2017-04-20 00:24:20 -04:00
|
|
|
}(this, (function (moment) { 'use strict';
|
2016-02-05 15:42:48 -05:00
|
|
|
|
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
|
|
|
var result = number + ' ';
|
|
|
|
switch (key) {
|
2016-02-05 15:42:48 -05:00
|
|
|
case 's':
|
|
|
|
return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
|
2014-08-20 14:41:50 -04:00
|
|
|
case 'm':
|
|
|
|
return withoutSuffix ? 'ena minuta' : 'eno minuto';
|
|
|
|
case 'mm':
|
|
|
|
if (number === 1) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix ? 'minuta' : 'minuto';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else if (number === 2) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'minute' : 'minutami';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'minut' : 'minutami';
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
|
|
|
return result;
|
|
|
|
case 'h':
|
|
|
|
return withoutSuffix ? 'ena ura' : 'eno uro';
|
|
|
|
case 'hh':
|
|
|
|
if (number === 1) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix ? 'ura' : 'uro';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else if (number === 2) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'uri' : 'urama';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'ure' : 'urami';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'ur' : 'urami';
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
|
|
|
return result;
|
2016-02-05 15:42:48 -05:00
|
|
|
case 'd':
|
|
|
|
return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
|
2014-08-20 14:41:50 -04:00
|
|
|
case 'dd':
|
|
|
|
if (number === 1) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'dan' : 'dnem';
|
|
|
|
} else if (number === 2) {
|
|
|
|
result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
|
|
|
return result;
|
2016-02-05 15:42:48 -05:00
|
|
|
case 'M':
|
|
|
|
return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
|
2014-08-20 14:41:50 -04:00
|
|
|
case 'MM':
|
|
|
|
if (number === 1) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else if (number === 2) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
|
|
|
return result;
|
2016-02-05 15:42:48 -05:00
|
|
|
case 'y':
|
|
|
|
return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
|
2014-08-20 14:41:50 -04:00
|
|
|
case 'yy':
|
|
|
|
if (number === 1) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'leto' : 'letom';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else if (number === 2) {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'leti' : 'letoma';
|
|
|
|
} else if (number < 5) {
|
|
|
|
result += withoutSuffix || isFuture ? 'leta' : 'leti';
|
2014-08-20 14:41:50 -04:00
|
|
|
} else {
|
2016-02-05 15:42:48 -05:00
|
|
|
result += withoutSuffix || isFuture ? 'let' : 'leti';
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
var sl = moment.defineLocale('sl', {
|
|
|
|
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('_'),
|
|
|
|
monthsParseExact: true,
|
|
|
|
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'
|
|
|
|
},
|
|
|
|
calendar : {
|
|
|
|
sameDay : '[danes ob] LT',
|
|
|
|
nextDay : '[jutri ob] LT',
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
nextWeek : function () {
|
|
|
|
switch (this.day()) {
|
2014-08-20 14:41:50 -04:00
|
|
|
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';
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
lastDay : '[včeraj ob] LT',
|
|
|
|
lastWeek : function () {
|
|
|
|
switch (this.day()) {
|
2014-08-20 14:41:50 -04:00
|
|
|
case 0:
|
2016-02-05 15:42:48 -05:00
|
|
|
return '[prejšnjo] [nedeljo] [ob] LT';
|
2014-08-20 14:41:50 -04:00
|
|
|
case 3:
|
2016-02-05 15:42:48 -05:00
|
|
|
return '[prejšnjo] [sredo] [ob] LT';
|
2014-08-20 14:41:50 -04:00
|
|
|
case 6:
|
2016-02-05 15:42:48 -05:00
|
|
|
return '[prejšnjo] [soboto] [ob] LT';
|
2014-08-20 14:41:50 -04:00
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
return '[prejšnji] dddd [ob] LT';
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
2014-08-20 14:41:50 -04:00
|
|
|
},
|
2017-04-20 00:24:20 -04:00
|
|
|
sameElse : 'L'
|
|
|
|
},
|
|
|
|
relativeTime : {
|
|
|
|
future : 'čez %s',
|
|
|
|
past : 'pred %s',
|
|
|
|
s : processRelativeTime,
|
|
|
|
m : processRelativeTime,
|
|
|
|
mm : processRelativeTime,
|
|
|
|
h : processRelativeTime,
|
|
|
|
hh : processRelativeTime,
|
|
|
|
d : processRelativeTime,
|
|
|
|
dd : processRelativeTime,
|
|
|
|
M : processRelativeTime,
|
|
|
|
MM : processRelativeTime,
|
|
|
|
y : processRelativeTime,
|
|
|
|
yy : processRelativeTime
|
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
|
|
|
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.
|
|
|
|
}
|
|
|
|
});
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
return sl;
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
})));
|