2016-02-05 15:42:48 -05:00
|
|
|
//! moment.js locale configuration
|
2020-11-10 20:34:26 -05:00
|
|
|
//! locale : Czech [cs]
|
|
|
|
//! author : petrbela : https://github.com/petrbela
|
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';
|
2013-07-24 21:09:29 -04:00
|
|
|
|
2020-11-10 20:34:26 -05:00
|
|
|
//! moment.js locale configuration
|
2013-06-07 04:03:09 -04:00
|
|
|
|
2020-11-10 20:34:26 -05:00
|
|
|
var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
|
|
|
|
monthsParse = [
|
|
|
|
/^led/i,
|
|
|
|
/^úno/i,
|
|
|
|
/^bře/i,
|
|
|
|
/^dub/i,
|
|
|
|
/^kvě/i,
|
|
|
|
/^(čvn|červen$|června)/i,
|
|
|
|
/^(čvc|červenec|července)/i,
|
|
|
|
/^srp/i,
|
|
|
|
/^zář/i,
|
|
|
|
/^říj/i,
|
|
|
|
/^lis/i,
|
|
|
|
/^pro/i,
|
|
|
|
],
|
|
|
|
// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
|
|
|
|
// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
|
|
|
|
monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
|
2019-04-26 09:00:57 -04:00
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
function plural(n) {
|
2020-11-10 20:34:26 -05:00
|
|
|
return n > 1 && n < 5 && ~~(n / 10) !== 1;
|
2013-06-07 04:03:09 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
function translate(number, withoutSuffix, key, isFuture) {
|
|
|
|
var result = number + ' ';
|
|
|
|
switch (key) {
|
2020-11-10 20:34:26 -05:00
|
|
|
case 's': // a few seconds / in a few seconds / a few seconds ago
|
|
|
|
return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'sekundy' : 'sekund');
|
|
|
|
} else {
|
|
|
|
return result + 'sekundami';
|
|
|
|
}
|
2020-11-10 20:34:26 -05:00
|
|
|
case 'm': // a minute / in a minute / a minute ago
|
|
|
|
return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'minuty' : 'minut');
|
|
|
|
} else {
|
|
|
|
return result + 'minutami';
|
|
|
|
}
|
2020-11-10 20:34:26 -05:00
|
|
|
case 'h': // an hour / in an hour / an hour ago
|
|
|
|
return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'hh': // 9 hours / in 9 hours / 9 hours ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'hodiny' : 'hodin');
|
|
|
|
} else {
|
|
|
|
return result + 'hodinami';
|
|
|
|
}
|
2020-11-10 20:34:26 -05:00
|
|
|
case 'd': // a day / in a day / a day ago
|
|
|
|
return withoutSuffix || isFuture ? 'den' : 'dnem';
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'dd': // 9 days / in 9 days / 9 days ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'dny' : 'dní');
|
|
|
|
} else {
|
|
|
|
return result + 'dny';
|
|
|
|
}
|
2020-11-10 20:34:26 -05:00
|
|
|
case 'M': // a month / in a month / a month ago
|
|
|
|
return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'MM': // 9 months / in 9 months / 9 months ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'měsíce' : 'měsíců');
|
|
|
|
} else {
|
|
|
|
return result + 'měsíci';
|
|
|
|
}
|
2020-11-10 20:34:26 -05:00
|
|
|
case 'y': // a year / in a year / a year ago
|
|
|
|
return withoutSuffix || isFuture ? 'rok' : 'rokem';
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'yy': // 9 years / in 9 years / 9 years ago
|
|
|
|
if (withoutSuffix || isFuture) {
|
|
|
|
return result + (plural(number) ? 'roky' : 'let');
|
|
|
|
} else {
|
|
|
|
return result + 'lety';
|
|
|
|
}
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
var cs = moment.defineLocale('cs', {
|
2020-11-10 20:34:26 -05:00
|
|
|
months: months,
|
|
|
|
monthsShort: monthsShort,
|
|
|
|
monthsRegex: monthsRegex,
|
|
|
|
monthsShortRegex: monthsRegex,
|
2019-04-26 09:00:57 -04:00
|
|
|
// NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
|
|
|
|
// Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
|
2020-11-10 20:34:26 -05:00
|
|
|
monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
|
|
|
|
monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
|
|
|
|
monthsParse: monthsParse,
|
|
|
|
longMonthsParse: monthsParse,
|
|
|
|
shortMonthsParse: monthsParse,
|
|
|
|
weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
|
|
|
|
weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
|
|
|
|
weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
|
|
|
|
longDateFormat: {
|
2018-04-26 03:15:53 -04:00
|
|
|
LT: 'H:mm',
|
2020-11-10 20:34:26 -05: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',
|
|
|
|
l: 'D. M. YYYY',
|
2014-08-20 14:41:50 -04:00
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
calendar: {
|
2018-04-26 03:15:53 -04:00
|
|
|
sameDay: '[dnes v] LT',
|
|
|
|
nextDay: '[zítra v] LT',
|
|
|
|
nextWeek: function () {
|
|
|
|
switch (this.day()) {
|
|
|
|
case 0:
|
|
|
|
return '[v neděli v] LT';
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
return '[v] dddd [v] LT';
|
|
|
|
case 3:
|
|
|
|
return '[ve středu v] LT';
|
|
|
|
case 4:
|
|
|
|
return '[ve čtvrtek v] LT';
|
|
|
|
case 5:
|
|
|
|
return '[v pátek v] LT';
|
|
|
|
case 6:
|
|
|
|
return '[v sobotu v] LT';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
lastDay: '[včera v] LT',
|
|
|
|
lastWeek: function () {
|
|
|
|
switch (this.day()) {
|
|
|
|
case 0:
|
|
|
|
return '[minulou neděli v] LT';
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
return '[minulé] dddd [v] LT';
|
|
|
|
case 3:
|
|
|
|
return '[minulou středu v] LT';
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
return '[minulý] dddd [v] LT';
|
|
|
|
case 6:
|
|
|
|
return '[minulou sobotu v] LT';
|
|
|
|
}
|
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
sameElse: 'L',
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
relativeTime: {
|
|
|
|
future: 'za %s',
|
|
|
|
past: 'před %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,
|
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
|
|
|
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 03:15:53 -04:00
|
|
|
},
|
|
|
|
});
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
return cs;
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
})));
|