123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- // moment.js locale configuration
- // locale : slovenian (sl)
- // author : Robert Sedovšek : https://github.com/sedovsek
- (function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
- }
- }(function (moment) {
- function translate(number, withoutSuffix, key) {
- var result = number + ' ';
- switch (key) {
- case 'm':
- return withoutSuffix ? 'ena minuta' : 'eno minuto';
- case 'mm':
- if (number === 1) {
- result += 'minuta';
- } else if (number === 2) {
- result += 'minuti';
- } else if (number === 3 || number === 4) {
- result += 'minute';
- } else {
- result += 'minut';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'ena ura' : 'eno uro';
- case 'hh':
- if (number === 1) {
- result += 'ura';
- } else if (number === 2) {
- result += 'uri';
- } else if (number === 3 || number === 4) {
- result += 'ure';
- } else {
- result += 'ur';
- }
- return result;
- case 'dd':
- if (number === 1) {
- result += 'dan';
- } else {
- result += 'dni';
- }
- return result;
- case 'MM':
- if (number === 1) {
- result += 'mesec';
- } else if (number === 2) {
- result += 'meseca';
- } else if (number === 3 || number === 4) {
- result += 'mesece';
- } else {
- result += 'mesecev';
- }
- return result;
- case 'yy':
- if (number === 1) {
- result += 'leto';
- } else if (number === 2) {
- result += 'leti';
- } else if (number === 3 || number === 4) {
- result += 'leta';
- } else {
- result += 'let';
- }
- return result;
- }
- }
- return moment.defineLocale('sl', {
- months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
- monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
- weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
- weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
- weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'),
- longDateFormat : {
- LT : 'H:mm',
- LTS : 'LT:ss',
- L : 'DD. MM. YYYY',
- LL : 'D. MMMM YYYY',
- LLL : 'D. MMMM YYYY LT',
- LLLL : 'dddd, D. MMMM YYYY LT'
- },
- calendar : {
- sameDay : '[danes ob] LT',
- nextDay : '[jutri ob] LT',
- nextWeek : function () {
- switch (this.day()) {
- case 0:
- return '[v] [nedeljo] [ob] LT';
- case 3:
- return '[v] [sredo] [ob] LT';
- case 6:
- return '[v] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[v] dddd [ob] LT';
- }
- },
- lastDay : '[včeraj ob] LT',
- lastWeek : function () {
- switch (this.day()) {
- case 0:
- case 3:
- case 6:
- return '[prejšnja] dddd [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prejšnji] dddd [ob] LT';
- }
- },
- sameElse : 'L'
- },
- relativeTime : {
- future : 'čez %s',
- past : '%s nazaj',
- s : 'nekaj sekund',
- m : translate,
- mm : translate,
- h : translate,
- hh : translate,
- d : 'en dan',
- dd : translate,
- M : 'en mesec',
- MM : translate,
- y : 'eno leto',
- yy : translate
- },
- ordinalParse: /\d{1,2}\./,
- ordinal : '%d.',
- week : {
- dow : 1, // Monday is the first day of the week.
- doy : 7 // The week that contains Jan 1st is the first week of the year.
- }
- });
- }));
|