Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / resources / lib / moment / locale / sr.js
1 //! moment.js locale configuration
2
3 ;(function (global, factory) {
4 typeof exports === 'object' && typeof module !== 'undefined'
5 && typeof require === 'function' ? factory(require('../moment')) :
6 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
7 factory(global.moment)
8 }(this, (function (moment) { 'use strict';
9
10
11 var translator = {
12 words: { //Different grammatical cases
13 ss: ['sekunda', 'sekunde', 'sekundi'],
14 m: ['jedan minut', 'jedne minute'],
15 mm: ['minut', 'minute', 'minuta'],
16 h: ['jedan sat', 'jednog sata'],
17 hh: ['sat', 'sata', 'sati'],
18 dd: ['dan', 'dana', 'dana'],
19 MM: ['mesec', 'meseca', 'meseci'],
20 yy: ['godina', 'godine', 'godina']
21 },
22 correctGrammaticalCase: function (number, wordKey) {
23 return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
24 },
25 translate: function (number, withoutSuffix, key) {
26 var wordKey = translator.words[key];
27 if (key.length === 1) {
28 return withoutSuffix ? wordKey[0] : wordKey[1];
29 } else {
30 return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
31 }
32 }
33 };
34
35 var sr = moment.defineLocale('sr', {
36 months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
37 monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
38 monthsParseExact: true,
39 weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),
40 weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
41 weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
42 weekdaysParseExact : true,
43 longDateFormat: {
44 LT: 'H:mm',
45 LTS : 'H:mm:ss',
46 L: 'DD.MM.YYYY',
47 LL: 'D. MMMM YYYY',
48 LLL: 'D. MMMM YYYY H:mm',
49 LLLL: 'dddd, D. MMMM YYYY H:mm'
50 },
51 calendar: {
52 sameDay: '[danas u] LT',
53 nextDay: '[sutra u] LT',
54 nextWeek: function () {
55 switch (this.day()) {
56 case 0:
57 return '[u] [nedelju] [u] LT';
58 case 3:
59 return '[u] [sredu] [u] LT';
60 case 6:
61 return '[u] [subotu] [u] LT';
62 case 1:
63 case 2:
64 case 4:
65 case 5:
66 return '[u] dddd [u] LT';
67 }
68 },
69 lastDay : '[juče u] LT',
70 lastWeek : function () {
71 var lastWeekDays = [
72 '[prošle] [nedelje] [u] LT',
73 '[prošlog] [ponedeljka] [u] LT',
74 '[prošlog] [utorka] [u] LT',
75 '[prošle] [srede] [u] LT',
76 '[prošlog] [četvrtka] [u] LT',
77 '[prošlog] [petka] [u] LT',
78 '[prošle] [subote] [u] LT'
79 ];
80 return lastWeekDays[this.day()];
81 },
82 sameElse : 'L'
83 },
84 relativeTime : {
85 future : 'za %s',
86 past : 'pre %s',
87 s : 'nekoliko sekundi',
88 ss : translator.translate,
89 m : translator.translate,
90 mm : translator.translate,
91 h : translator.translate,
92 hh : translator.translate,
93 d : 'dan',
94 dd : translator.translate,
95 M : 'mesec',
96 MM : translator.translate,
97 y : 'godinu',
98 yy : translator.translate
99 },
100 dayOfMonthOrdinalParse: /\d{1,2}\./,
101 ordinal : '%d.',
102 week : {
103 dow : 1, // Monday is the first day of the week.
104 doy : 7 // The week that contains Jan 7th is the first week of the year.
105 }
106 });
107
108 return sr;
109
110 })));