Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / resources / lib / moment / locale / me.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: ['sekund', 'sekunda', 'sekundi'],
14 m: ['jedan minut', 'jednog minuta'],
15 mm: ['minut', 'minuta', 'minuta'],
16 h: ['jedan sat', 'jednog sata'],
17 hh: ['sat', 'sata', 'sati'],
18 dd: ['dan', 'dana', 'dana'],
19 MM: ['mjesec', 'mjeseca', 'mjeseci'],
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 me = moment.defineLocale('me', {
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: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
40 weekdaysShort: 'ned._pon._uto._sri._č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: '[sjutra u] LT',
54
55 nextWeek: function () {
56 switch (this.day()) {
57 case 0:
58 return '[u] [nedjelju] [u] LT';
59 case 3:
60 return '[u] [srijedu] [u] LT';
61 case 6:
62 return '[u] [subotu] [u] LT';
63 case 1:
64 case 2:
65 case 4:
66 case 5:
67 return '[u] dddd [u] LT';
68 }
69 },
70 lastDay : '[juče u] LT',
71 lastWeek : function () {
72 var lastWeekDays = [
73 '[prošle] [nedjelje] [u] LT',
74 '[prošlog] [ponedjeljka] [u] LT',
75 '[prošlog] [utorka] [u] LT',
76 '[prošle] [srijede] [u] LT',
77 '[prošlog] [četvrtka] [u] LT',
78 '[prošlog] [petka] [u] LT',
79 '[prošle] [subote] [u] LT'
80 ];
81 return lastWeekDays[this.day()];
82 },
83 sameElse : 'L'
84 },
85 relativeTime : {
86 future : 'za %s',
87 past : 'prije %s',
88 s : 'nekoliko sekundi',
89 ss : translator.translate,
90 m : translator.translate,
91 mm : translator.translate,
92 h : translator.translate,
93 hh : translator.translate,
94 d : 'dan',
95 dd : translator.translate,
96 M : 'mjesec',
97 MM : translator.translate,
98 y : 'godinu',
99 yy : translator.translate
100 },
101 dayOfMonthOrdinalParse: /\d{1,2}\./,
102 ordinal : '%d.',
103 week : {
104 dow : 1, // Monday is the first day of the week.
105 doy : 7 // The week that contains Jan 7th is the first week of the year.
106 }
107 });
108
109 return me;
110
111 })));