1 // moment.js language configuration
2 // language : czech (cs)
3 // author : petrbela : https://github.com/petrbela
6 if (typeof define
=== 'function' && define
.amd
) {
7 define(['moment'], factory
); // AMD
8 } else if (typeof exports
=== 'object') {
9 module
.exports
= factory(require('../moment')); // Node
11 factory(window
.moment
); // Browser global
14 var months
= "leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),
15 monthsShort
= "led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");
18 return (n
> 1) && (n
< 5) && (~~(n
/ 10) !== 1);
21 function translate(number
, withoutSuffix
, key
, isFuture
) {
22 var result
= number
+ " ";
24 case 's': // a few seconds / in a few seconds / a few seconds ago
25 return (withoutSuffix
|| isFuture
) ? 'pár sekund' : 'pár sekundami';
26 case 'm': // a minute / in a minute / a minute ago
27 return withoutSuffix
? 'minuta' : (isFuture
? 'minutu' : 'minutou');
28 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
29 if (withoutSuffix
|| isFuture
) {
30 return result
+ (plural(number
) ? 'minuty' : 'minut');
32 return result
+ 'minutami';
35 case 'h': // an hour / in an hour / an hour ago
36 return withoutSuffix
? 'hodina' : (isFuture
? 'hodinu' : 'hodinou');
37 case 'hh': // 9 hours / in 9 hours / 9 hours ago
38 if (withoutSuffix
|| isFuture
) {
39 return result
+ (plural(number
) ? 'hodiny' : 'hodin');
41 return result
+ 'hodinami';
44 case 'd': // a day / in a day / a day ago
45 return (withoutSuffix
|| isFuture
) ? 'den' : 'dnem';
46 case 'dd': // 9 days / in 9 days / 9 days ago
47 if (withoutSuffix
|| isFuture
) {
48 return result
+ (plural(number
) ? 'dny' : 'dní');
50 return result
+ 'dny';
53 case 'M': // a month / in a month / a month ago
54 return (withoutSuffix
|| isFuture
) ? 'měsíc' : 'měsícem';
55 case 'MM': // 9 months / in 9 months / 9 months ago
56 if (withoutSuffix
|| isFuture
) {
57 return result
+ (plural(number
) ? 'měsíce' : 'měsíců');
59 return result
+ 'měsíci';
62 case 'y': // a year / in a year / a year ago
63 return (withoutSuffix
|| isFuture
) ? 'rok' : 'rokem';
64 case 'yy': // 9 years / in 9 years / 9 years ago
65 if (withoutSuffix
|| isFuture
) {
66 return result
+ (plural(number
) ? 'roky' : 'let');
68 return result
+ 'lety';
74 return moment
.lang('cs', {
76 monthsShort
: monthsShort
,
77 monthsParse
: (function (months
, monthsShort
) {
78 var i
, _monthsParse
= [];
79 for (i
= 0; i
< 12; i
++) {
80 // use custom parser to solve problem with July (červenec)
81 _monthsParse
[i
] = new RegExp('^' + months
[i
] + '$|^' + monthsShort
[i
] + '$', 'i');
84 }(months
, monthsShort
)),
85 weekdays
: "neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),
86 weekdaysShort
: "ne_po_út_st_čt_pá_so".split("_"),
87 weekdaysMin
: "ne_po_út_st_čt_pá_so".split("_"),
92 LLL
: "D. MMMM YYYY LT",
93 LLLL
: "dddd D. MMMM YYYY LT"
96 sameDay
: "[dnes v] LT",
97 nextDay
: '[zítra v] LT',
98 nextWeek: function () {
101 return '[v neděli v] LT';
104 return '[v] dddd [v] LT';
106 return '[ve středu v] LT';
108 return '[ve čtvrtek v] LT';
110 return '[v pátek v] LT';
112 return '[v sobotu v] LT';
115 lastDay
: '[včera v] LT',
116 lastWeek: function () {
117 switch (this.day()) {
119 return '[minulou neděli v] LT';
122 return '[minulé] dddd [v] LT';
124 return '[minulou středu v] LT';
127 return '[minulý] dddd [v] LT';
129 return '[minulou sobotu v] LT';
151 dow
: 1, // Monday is the first day of the week.
152 doy
: 4 // The week that contains Jan 4th is the first week of the year.