1 // moment.js locale configuration
3 // author : petrbela : https://github.com/petrbela
6 // Comment out broken wrapper, see T145382
7 /*if (typeof define === 'function' && define.amd) {
8 define(['moment'], factory); // AMD
9 } else if (typeof exports === 'object') {
10 module.exports = factory(require('../moment')); // Node
12 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
16 var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),
17 monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
20 return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
23 function translate(number, withoutSuffix, key, isFuture) {
24 var result = number + ' ';
26 case 's': // a few seconds / in a few seconds / a few seconds ago
27 return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
28 case 'm': // a minute / in a minute / a minute ago
29 return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
30 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
31 if (withoutSuffix || isFuture) {
32 return result + (plural(number) ? 'minuty' : 'minut');
34 return result + 'minutami';
37 case 'h': // an hour / in an hour / an hour ago
38 return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
39 case 'hh': // 9 hours / in 9 hours / 9 hours ago
40 if (withoutSuffix || isFuture) {
41 return result + (plural(number) ? 'hodiny' : 'hodin');
43 return result + 'hodinami';
46 case 'd': // a day / in a day / a day ago
47 return (withoutSuffix || isFuture) ? 'den' : 'dnem';
48 case 'dd': // 9 days / in 9 days / 9 days ago
49 if (withoutSuffix || isFuture) {
50 return result + (plural(number) ? 'dny' : 'dní');
52 return result + 'dny';
55 case 'M': // a month / in a month / a month ago
56 return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
57 case 'MM': // 9 months / in 9 months / 9 months ago
58 if (withoutSuffix || isFuture) {
59 return result + (plural(number) ? 'měsíce' : 'měsíců');
61 return result + 'měsíci';
64 case 'y': // a year / in a year / a year ago
65 return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
66 case 'yy': // 9 years / in 9 years / 9 years ago
67 if (withoutSuffix || isFuture) {
68 return result + (plural(number) ? 'roky' : 'let');
70 return result + 'lety';
76 return moment.defineLocale('cs', {
78 monthsShort : monthsShort,
79 monthsParse : (function (months, monthsShort) {
80 var i, _monthsParse = [];
81 for (i = 0; i < 12; i++) {
82 // use custom parser to solve problem with July (červenec)
83 _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
86 }(months, monthsShort)),
87 weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
88 weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),
89 weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),
95 LLL : 'D. MMMM YYYY LT',
96 LLLL : 'dddd D. MMMM YYYY LT'
99 sameDay: '[dnes v] LT',
100 nextDay: '[zítra v] LT',
101 nextWeek: function () {
102 switch (this.day()) {
104 return '[v neděli v] LT';
107 return '[v] dddd [v] LT';
109 return '[ve středu v] LT';
111 return '[ve čtvrtek v] LT';
113 return '[v pátek v] LT';
115 return '[v sobotu v] LT';
118 lastDay: '[včera v] LT',
119 lastWeek: function () {
120 switch (this.day()) {
122 return '[minulou neděli v] LT';
125 return '[minulé] dddd [v] LT';
127 return '[minulou středu v] LT';
130 return '[minulý] dddd [v] LT';
132 return '[minulou sobotu v] LT';
152 ordinalParse : /\d{1,2}\./,
155 dow : 1, // Monday is the first day of the week.
156 doy : 4 // The week that contains Jan 4th is the first week of the year.