2016-02-06 04:42:48 +08:00
|
|
|
//! moment.js locale configuration
|
2020-11-11 09:34:26 +08:00
|
|
|
//! locale : Slovak [sk]
|
|
|
|
//! author : Martin Minka : https://github.com/k2s
|
|
|
|
//! based on work of petrbela : https://github.com/petrbela
|
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';
|
2014-08-21 02:41:50 +08:00
|
|
|
|
2020-11-11 09:34:26 +08:00
|
|
|
//! moment.js locale configuration
|
2014-08-21 02:41:50 +08:00
|
|
|
|
2020-11-11 09:34:26 +08:00
|
|
|
var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
|
|
|
|
'_'
|
|
|
|
),
|
2018-04-26 15:15:53 +08:00
|
|
|
monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
|
|
|
|
function plural(n) {
|
2020-11-11 09:34:26 +08:00
|
|
|
return n > 1 && n < 5;
|
2018-04-26 15:15:53 +08:00
|
|
|
}
|
|
|
|
function translate(number, withoutSuffix, key, isFuture) {
|
|
|
|
var result = number + ' ';
|
|
|
|
switch (key) {
|
2020-11-11 09:34:26 +08:00
|
|
|
case 's': // a few seconds / in a few seconds / a few seconds ago
|
|
|
|
return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
|
2018-04-26 15:15:53 +08:00
|
|
|
case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'sekundy' : 'sekúnd');
|
|
|
|
} else {
|
|
|
|
return result + 'sekundami';
|
|
|
|
}
|
2020-11-11 09:34:26 +08:00
|
|
|
case 'm': // a minute / in a minute / a minute ago
|
|
|
|
return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
|
2018-04-26 15:15:53 +08:00
|
|
|
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'minúty' : 'minút');
|
|
|
|
} else {
|
|
|
|
return result + 'minútami';
|
|
|
|
}
|
2020-11-11 09:34:26 +08:00
|
|
|
case 'h': // an hour / in an hour / an hour ago
|
|
|
|
return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
|
2018-04-26 15:15:53 +08:00
|
|
|
case 'hh': // 9 hours / in 9 hours / 9 hours ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'hodiny' : 'hodín');
|
|
|
|
} else {
|
|
|
|
return result + 'hodinami';
|
|
|
|
}
|
2020-11-11 09:34:26 +08:00
|
|
|
case 'd': // a day / in a day / a day ago
|
|
|
|
return withoutSuffix || isFuture ? 'deň' : 'dňom';
|
2018-04-26 15:15:53 +08:00
|
|
|
case 'dd': // 9 days / in 9 days / 9 days ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'dni' : 'dní');
|
|
|
|
} else {
|
|
|
|
return result + 'dňami';
|
|
|
|
}
|
2020-11-11 09:34:26 +08:00
|
|
|
case 'M': // a month / in a month / a month ago
|
|
|
|
return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
|
2018-04-26 15:15:53 +08:00
|
|
|
case 'MM': // 9 months / in 9 months / 9 months ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'mesiace' : 'mesiacov');
|
|
|
|
} else {
|
|
|
|
return result + 'mesiacmi';
|
|
|
|
}
|
2020-11-11 09:34:26 +08:00
|
|
|
case 'y': // a year / in a year / a year ago
|
|
|
|
return withoutSuffix || isFuture ? 'rok' : 'rokom';
|
2018-04-26 15:15:53 +08:00
|
|
|
case 'yy': // 9 years / in 9 years / 9 years ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'roky' : 'rokov');
|
|
|
|
} else {
|
|
|
|
return result + 'rokmi';
|
|
|
|
}
|
|
|
|
}
|
2014-08-21 02:41:50 +08:00
|
|
|
}
|
|
|
|
|
2018-04-26 15:15:53 +08:00
|
|
|
var sk = moment.defineLocale('sk', {
|
2020-11-11 09:34:26 +08:00
|
|
|
months: months,
|
|
|
|
monthsShort: monthsShort,
|
|
|
|
weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
|
|
|
|
weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
|
|
|
|
weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
|
|
|
|
longDateFormat: {
|
2018-04-26 15:15:53 +08:00
|
|
|
LT: 'H:mm',
|
2020-11-11 09:34:26 +08:00
|
|
|
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',
|
2017-04-20 12:24:20 +08:00
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
calendar: {
|
2018-04-26 15:15:53 +08:00
|
|
|
sameDay: '[dnes o] LT',
|
|
|
|
nextDay: '[zajtra o] LT',
|
|
|
|
nextWeek: function () {
|
|
|
|
switch (this.day()) {
|
|
|
|
case 0:
|
|
|
|
return '[v nedeľu o] LT';
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
return '[v] dddd [o] LT';
|
|
|
|
case 3:
|
|
|
|
return '[v stredu o] LT';
|
|
|
|
case 4:
|
|
|
|
return '[vo štvrtok o] LT';
|
|
|
|
case 5:
|
|
|
|
return '[v piatok o] LT';
|
|
|
|
case 6:
|
|
|
|
return '[v sobotu o] LT';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
lastDay: '[včera o] LT',
|
|
|
|
lastWeek: function () {
|
|
|
|
switch (this.day()) {
|
|
|
|
case 0:
|
|
|
|
return '[minulú nedeľu o] LT';
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
return '[minulý] dddd [o] LT';
|
|
|
|
case 3:
|
|
|
|
return '[minulú stredu o] LT';
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
return '[minulý] dddd [o] LT';
|
|
|
|
case 6:
|
|
|
|
return '[minulú sobotu o] LT';
|
|
|
|
}
|
|
|
|
},
|
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: 'za %s',
|
|
|
|
past: 'pred %s',
|
|
|
|
s: translate,
|
|
|
|
ss: translate,
|
|
|
|
m: translate,
|
|
|
|
mm: translate,
|
|
|
|
h: translate,
|
|
|
|
hh: translate,
|
|
|
|
d: translate,
|
|
|
|
dd: translate,
|
|
|
|
M: translate,
|
|
|
|
MM: translate,
|
|
|
|
y: translate,
|
|
|
|
yy: translate,
|
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: 4, // The week that contains Jan 4th 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 sk;
|
2016-02-06 04:42:48 +08:00
|
|
|
|
2017-04-20 12:24:20 +08:00
|
|
|
})));
|