1 //! moment.js locale configuration
2 //! locale : Slovak [sk]
3 //! author : Martin Minka : https://github.com/k2s
4 //! based on work of petrbela : https://github.com/petrbela
6 ;(function (global
, factory
) {
7 typeof exports
=== 'object' && typeof module
!== 'undefined'
8 && typeof require
=== 'function' ? factory(require('../moment')) :
9 typeof define
=== 'function' && define
.amd
? define(['../moment'], factory
) :
10 factory(global
.moment
)
11 }(this, function (moment
) { 'use strict';
14 var months
= 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),
15 monthsShort
= 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
17 return (n
> 1) && (n
< 5);
19 function translate(number
, withoutSuffix
, key
, isFuture
) {
20 var result
= number
+ ' ';
22 case 's': // a few seconds / in a few seconds / a few seconds ago
23 return (withoutSuffix
|| isFuture
) ? 'pár sekúnd' : 'pár sekundami';
24 case 'm': // a minute / in a minute / a minute ago
25 return withoutSuffix
? 'minúta' : (isFuture
? 'minútu' : 'minútou');
26 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
27 if (withoutSuffix
|| isFuture
) {
28 return result
+ (plural(number
) ? 'minúty' : 'minút');
30 return result
+ 'minútami';
33 case 'h': // an hour / in an hour / an hour ago
34 return withoutSuffix
? 'hodina' : (isFuture
? 'hodinu' : 'hodinou');
35 case 'hh': // 9 hours / in 9 hours / 9 hours ago
36 if (withoutSuffix
|| isFuture
) {
37 return result
+ (plural(number
) ? 'hodiny' : 'hodín');
39 return result
+ 'hodinami';
42 case 'd': // a day / in a day / a day ago
43 return (withoutSuffix
|| isFuture
) ? 'deň' : 'dňom';
44 case 'dd': // 9 days / in 9 days / 9 days ago
45 if (withoutSuffix
|| isFuture
) {
46 return result
+ (plural(number
) ? 'dni' : 'dní');
48 return result
+ 'dňami';
51 case 'M': // a month / in a month / a month ago
52 return (withoutSuffix
|| isFuture
) ? 'mesiac' : 'mesiacom';
53 case 'MM': // 9 months / in 9 months / 9 months ago
54 if (withoutSuffix
|| isFuture
) {
55 return result
+ (plural(number
) ? 'mesiace' : 'mesiacov');
57 return result
+ 'mesiacmi';
60 case 'y': // a year / in a year / a year ago
61 return (withoutSuffix
|| isFuture
) ? 'rok' : 'rokom';
62 case 'yy': // 9 years / in 9 years / 9 years ago
63 if (withoutSuffix
|| isFuture
) {
64 return result
+ (plural(number
) ? 'roky' : 'rokov');
66 return result
+ 'rokmi';
72 var sk
= moment
.defineLocale('sk', {
74 monthsShort
: monthsShort
,
75 weekdays
: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
76 weekdaysShort
: 'ne_po_ut_st_št_pi_so'.split('_'),
77 weekdaysMin
: 'ne_po_ut_st_št_pi_so'.split('_'),
83 LLL
: 'D. MMMM YYYY H:mm',
84 LLLL
: 'dddd D. MMMM YYYY H:mm'
87 sameDay
: '[dnes o] LT',
88 nextDay
: '[zajtra o] LT',
89 nextWeek: function () {
92 return '[v nedeľu o] LT';
95 return '[v] dddd [o] LT';
97 return '[v stredu o] LT';
99 return '[vo štvrtok o] LT';
101 return '[v piatok o] LT';
103 return '[v sobotu o] LT';
106 lastDay
: '[včera o] LT',
107 lastWeek: function () {
108 switch (this.day()) {
110 return '[minulú nedeľu o] LT';
113 return '[minulý] dddd [o] LT';
115 return '[minulú stredu o] LT';
118 return '[minulý] dddd [o] LT';
120 return '[minulú sobotu o] LT';
140 ordinalParse
: /\d{1,2}\./,
143 dow
: 1, // Monday is the first day of the week.
144 doy
: 4 // The week that contains Jan 4th is the first week of the year.