1 //! moment.js locale configuration
2 //! locale : Serbian [sr]
3 //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
5 ;(function (global, factory) {
6 typeof exports === 'object' && typeof module !== 'undefined'
7 && typeof require === 'function' ? factory(require('../moment')) :
8 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
10 }(this, (function (moment) { 'use strict';
12 //! moment.js locale configuration
16 //Different grammatical cases
17 ss: ['sekunda', 'sekunde', 'sekundi'],
18 m: ['jedan minut', 'jedne minute'],
19 mm: ['minut', 'minute', 'minuta'],
20 h: ['jedan sat', 'jednog sata'],
21 hh: ['sat', 'sata', 'sati'],
22 dd: ['dan', 'dana', 'dana'],
23 MM: ['mesec', 'meseca', 'meseci'],
24 yy: ['godina', 'godine', 'godina'],
26 correctGrammaticalCase: function (number, wordKey) {
29 : number >= 2 && number <= 4
33 translate: function (number, withoutSuffix, key) {
34 var wordKey = translator.words[key];
35 if (key.length === 1) {
36 return withoutSuffix ? wordKey[0] : wordKey[1];
41 translator.correctGrammaticalCase(number, wordKey)
47 var sr = moment.defineLocale('sr', {
48 months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
51 monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
54 monthsParseExact: true,
55 weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
58 weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
59 weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
60 weekdaysParseExact: true,
66 LLL: 'D. MMMM YYYY H:mm',
67 LLLL: 'dddd, D. MMMM YYYY H:mm',
70 sameDay: '[danas u] LT',
71 nextDay: '[sutra u] LT',
72 nextWeek: function () {
75 return '[u] [nedelju] [u] LT';
77 return '[u] [sredu] [u] LT';
79 return '[u] [subotu] [u] LT';
84 return '[u] dddd [u] LT';
87 lastDay: '[juče u] LT',
88 lastWeek: function () {
90 '[prošle] [nedelje] [u] LT',
91 '[prošlog] [ponedeljka] [u] LT',
92 '[prošlog] [utorka] [u] LT',
93 '[prošle] [srede] [u] LT',
94 '[prošlog] [četvrtka] [u] LT',
95 '[prošlog] [petka] [u] LT',
96 '[prošle] [subote] [u] LT',
98 return lastWeekDays[this.day()];
105 s: 'nekoliko sekundi',
106 ss: translator.translate,
107 m: translator.translate,
108 mm: translator.translate,
109 h: translator.translate,
110 hh: translator.translate,
112 dd: translator.translate,
114 MM: translator.translate,
116 yy: translator.translate,
118 dayOfMonthOrdinalParse: /\d{1,2}\./,
121 dow: 1, // Monday is the first day of the week.
122 doy: 7, // The week that contains Jan 7th is the first week of the year.