Brought in another asset for Ray's eye form: moment
[openemr.git] / public / assets / moment-2-13-0 / src / locale / sr.js
blob46fc74966e9554bc184a43c005940a2692b50e89
1 //! moment.js locale configuration
2 //! locale : Serbian-latin (sr)
3 //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
5 import moment from '../moment';
7 var translator = {
8     words: { //Different grammatical cases
9         m: ['jedan minut', 'jedne minute'],
10         mm: ['minut', 'minute', 'minuta'],
11         h: ['jedan sat', 'jednog sata'],
12         hh: ['sat', 'sata', 'sati'],
13         dd: ['dan', 'dana', 'dana'],
14         MM: ['mesec', 'meseca', 'meseci'],
15         yy: ['godina', 'godine', 'godina']
16     },
17     correctGrammaticalCase: function (number, wordKey) {
18         return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
19     },
20     translate: function (number, withoutSuffix, key) {
21         var wordKey = translator.words[key];
22         if (key.length === 1) {
23             return withoutSuffix ? wordKey[0] : wordKey[1];
24         } else {
25             return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
26         }
27     }
30 export default moment.defineLocale('sr', {
31     months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
32     monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
33     monthsParseExact: true,
34     weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),
35     weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
36     weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
37     weekdaysParseExact : true,
38     longDateFormat: {
39         LT: 'H:mm',
40         LTS : 'H:mm:ss',
41         L: 'DD. MM. YYYY',
42         LL: 'D. MMMM YYYY',
43         LLL: 'D. MMMM YYYY H:mm',
44         LLLL: 'dddd, D. MMMM YYYY H:mm'
45     },
46     calendar: {
47         sameDay: '[danas u] LT',
48         nextDay: '[sutra u] LT',
49         nextWeek: function () {
50             switch (this.day()) {
51             case 0:
52                 return '[u] [nedelju] [u] LT';
53             case 3:
54                 return '[u] [sredu] [u] LT';
55             case 6:
56                 return '[u] [subotu] [u] LT';
57             case 1:
58             case 2:
59             case 4:
60             case 5:
61                 return '[u] dddd [u] LT';
62             }
63         },
64         lastDay  : '[juče u] LT',
65         lastWeek : function () {
66             var lastWeekDays = [
67                 '[prošle] [nedelje] [u] LT',
68                 '[prošlog] [ponedeljka] [u] LT',
69                 '[prošlog] [utorka] [u] LT',
70                 '[prošle] [srede] [u] LT',
71                 '[prošlog] [četvrtka] [u] LT',
72                 '[prošlog] [petka] [u] LT',
73                 '[prošle] [subote] [u] LT'
74             ];
75             return lastWeekDays[this.day()];
76         },
77         sameElse : 'L'
78     },
79     relativeTime : {
80         future : 'za %s',
81         past   : 'pre %s',
82         s      : 'nekoliko sekundi',
83         m      : translator.translate,
84         mm     : translator.translate,
85         h      : translator.translate,
86         hh     : translator.translate,
87         d      : 'dan',
88         dd     : translator.translate,
89         M      : 'mesec',
90         MM     : translator.translate,
91         y      : 'godinu',
92         yy     : translator.translate
93     },
94     ordinalParse: /\d{1,2}\./,
95     ordinal : '%d.',
96     week : {
97         dow : 1, // Monday is the first day of the week.
98         doy : 7  // The week that contains Jan 1st is the first week of the year.
99     }