LaravelTest
155 строк · 5.9 Кб
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
5
6;(function (global, factory) {7typeof exports === 'object' && typeof module !== 'undefined'8&& typeof require === 'function' ? factory(require('../moment')) :9typeof define === 'function' && define.amd ? define(['../moment'], factory) :10factory(global.moment)11}(this, (function (moment) { 'use strict';12
13//! moment.js locale configuration14
15var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(16'_'17),18monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');19function plural(n) {20return n > 1 && n < 5;21}22function translate(number, withoutSuffix, key, isFuture) {23var result = number + ' ';24switch (key) {25case 's': // a few seconds / in a few seconds / a few seconds ago26return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';27case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago28if (withoutSuffix || isFuture) {29return result + (plural(number) ? 'sekundy' : 'sekúnd');30} else {31return result + 'sekundami';32}33case 'm': // a minute / in a minute / a minute ago34return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';35case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago36if (withoutSuffix || isFuture) {37return result + (plural(number) ? 'minúty' : 'minút');38} else {39return result + 'minútami';40}41case 'h': // an hour / in an hour / an hour ago42return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';43case 'hh': // 9 hours / in 9 hours / 9 hours ago44if (withoutSuffix || isFuture) {45return result + (plural(number) ? 'hodiny' : 'hodín');46} else {47return result + 'hodinami';48}49case 'd': // a day / in a day / a day ago50return withoutSuffix || isFuture ? 'deň' : 'dňom';51case 'dd': // 9 days / in 9 days / 9 days ago52if (withoutSuffix || isFuture) {53return result + (plural(number) ? 'dni' : 'dní');54} else {55return result + 'dňami';56}57case 'M': // a month / in a month / a month ago58return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';59case 'MM': // 9 months / in 9 months / 9 months ago60if (withoutSuffix || isFuture) {61return result + (plural(number) ? 'mesiace' : 'mesiacov');62} else {63return result + 'mesiacmi';64}65case 'y': // a year / in a year / a year ago66return withoutSuffix || isFuture ? 'rok' : 'rokom';67case 'yy': // 9 years / in 9 years / 9 years ago68if (withoutSuffix || isFuture) {69return result + (plural(number) ? 'roky' : 'rokov');70} else {71return result + 'rokmi';72}73}74}75
76var sk = moment.defineLocale('sk', {77months: months,78monthsShort: monthsShort,79weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),80weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),81weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),82longDateFormat: {83LT: 'H:mm',84LTS: 'H:mm:ss',85L: 'DD.MM.YYYY',86LL: 'D. MMMM YYYY',87LLL: 'D. MMMM YYYY H:mm',88LLLL: 'dddd D. MMMM YYYY H:mm',89},90calendar: {91sameDay: '[dnes o] LT',92nextDay: '[zajtra o] LT',93nextWeek: function () {94switch (this.day()) {95case 0:96return '[v nedeľu o] LT';97case 1:98case 2:99return '[v] dddd [o] LT';100case 3:101return '[v stredu o] LT';102case 4:103return '[vo štvrtok o] LT';104case 5:105return '[v piatok o] LT';106case 6:107return '[v sobotu o] LT';108}109},110lastDay: '[včera o] LT',111lastWeek: function () {112switch (this.day()) {113case 0:114return '[minulú nedeľu o] LT';115case 1:116case 2:117return '[minulý] dddd [o] LT';118case 3:119return '[minulú stredu o] LT';120case 4:121case 5:122return '[minulý] dddd [o] LT';123case 6:124return '[minulú sobotu o] LT';125}126},127sameElse: 'L',128},129relativeTime: {130future: 'za %s',131past: 'pred %s',132s: translate,133ss: translate,134m: translate,135mm: translate,136h: translate,137hh: translate,138d: translate,139dd: translate,140M: translate,141MM: translate,142y: translate,143yy: translate,144},145dayOfMonthOrdinalParse: /\d{1,2}\./,146ordinal: '%d.',147week: {148dow: 1, // Monday is the first day of the week.149doy: 4, // The week that contains Jan 4th is the first week of the year.150},151});152
153return sk;154
155})));156