1 // moment.js language configuration
2 // language : slovak (sk)
3 // author : Martin Minka : https://github.com/k2s
4 // based on work of petrbela : https://github.com/petrbela
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(window
.moment
); // Browser global
15 var months
= "január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),
16 monthsShort
= "jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");
19 return (n
> 1) && (n
< 5);
22 function translate(number
, withoutSuffix
, key
, isFuture
) {
23 var result
= number
+ " ";
25 case 's': // a few seconds / in a few seconds / a few seconds ago
26 return (withoutSuffix
|| isFuture
) ? 'pár sekúnd' : 'pár sekundami';
27 case 'm': // a minute / in a minute / a minute ago
28 return withoutSuffix
? 'minúta' : (isFuture
? 'minútu' : 'minútou');
29 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
30 if (withoutSuffix
|| isFuture
) {
31 return result
+ (plural(number
) ? 'minúty' : 'minút');
33 return result
+ 'minútami';
36 case 'h': // an hour / in an hour / an hour ago
37 return withoutSuffix
? 'hodina' : (isFuture
? 'hodinu' : 'hodinou');
38 case 'hh': // 9 hours / in 9 hours / 9 hours ago
39 if (withoutSuffix
|| isFuture
) {
40 return result
+ (plural(number
) ? 'hodiny' : 'hodín');
42 return result
+ 'hodinami';
45 case 'd': // a day / in a day / a day ago
46 return (withoutSuffix
|| isFuture
) ? 'deň' : 'dňom';
47 case 'dd': // 9 days / in 9 days / 9 days ago
48 if (withoutSuffix
|| isFuture
) {
49 return result
+ (plural(number
) ? 'dni' : 'dní');
51 return result
+ 'dňami';
54 case 'M': // a month / in a month / a month ago
55 return (withoutSuffix
|| isFuture
) ? 'mesiac' : 'mesiacom';
56 case 'MM': // 9 months / in 9 months / 9 months ago
57 if (withoutSuffix
|| isFuture
) {
58 return result
+ (plural(number
) ? 'mesiace' : 'mesiacov');
60 return result
+ 'mesiacmi';
63 case 'y': // a year / in a year / a year ago
64 return (withoutSuffix
|| isFuture
) ? 'rok' : 'rokom';
65 case 'yy': // 9 years / in 9 years / 9 years ago
66 if (withoutSuffix
|| isFuture
) {
67 return result
+ (plural(number
) ? 'roky' : 'rokov');
69 return result
+ 'rokmi';
75 return moment
.lang('sk', {
77 monthsShort
: monthsShort
,
78 monthsParse
: (function (months
, monthsShort
) {
79 var i
, _monthsParse
= [];
80 for (i
= 0; i
< 12; i
++) {
81 // use custom parser to solve problem with July (červenec)
82 _monthsParse
[i
] = new RegExp('^' + months
[i
] + '$|^' + monthsShort
[i
] + '$', 'i');
85 }(months
, monthsShort
)),
86 weekdays
: "nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),
87 weekdaysShort
: "ne_po_ut_st_št_pi_so".split("_"),
88 weekdaysMin
: "ne_po_ut_st_št_pi_so".split("_"),
93 LLL
: "D. MMMM YYYY LT",
94 LLLL
: "dddd D. MMMM YYYY LT"
97 sameDay
: "[dnes o] LT",
98 nextDay
: '[zajtra o] LT',
99 nextWeek: function () {
100 switch (this.day()) {
102 return '[v nedeľu o] LT';
105 return '[v] dddd [o] LT';
107 return '[v stredu o] LT';
109 return '[vo štvrtok o] LT';
111 return '[v piatok o] LT';
113 return '[v sobotu o] LT';
116 lastDay
: '[včera o] LT',
117 lastWeek: function () {
118 switch (this.day()) {
120 return '[minulú nedeľu o] LT';
123 return '[minulý] dddd [o] LT';
125 return '[minulú stredu o] LT';
128 return '[minulý] dddd [o] LT';
130 return '[minulú sobotu o] LT';
152 dow
: 1, // Monday is the first day of the week.
153 doy
: 4 // The week that contains Jan 4th is the first week of the year.