Localisation updates from https://translatewiki.net.
[mediawiki.git] / resources / lib / moment / locale / hr.js
blob6184618ff968541f5768cbe1d00a35d1f53fcb8b
1 //! moment.js locale configuration
2 //! locale : Croatian [hr]
3 //! author : Bojan Marković : https://github.com/bmarkovic
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) :
9    factory(global.moment)
10 }(this, (function (moment) { 'use strict';
12     //! moment.js locale configuration
14     function translate(number, withoutSuffix, key) {
15         var result = number + ' ';
16         switch (key) {
17             case 'ss':
18                 if (number === 1) {
19                     result += 'sekunda';
20                 } else if (number === 2 || number === 3 || number === 4) {
21                     result += 'sekunde';
22                 } else {
23                     result += 'sekundi';
24                 }
25                 return result;
26             case 'm':
27                 return withoutSuffix ? 'jedna minuta' : 'jedne minute';
28             case 'mm':
29                 if (number === 1) {
30                     result += 'minuta';
31                 } else if (number === 2 || number === 3 || number === 4) {
32                     result += 'minute';
33                 } else {
34                     result += 'minuta';
35                 }
36                 return result;
37             case 'h':
38                 return withoutSuffix ? 'jedan sat' : 'jednog sata';
39             case 'hh':
40                 if (number === 1) {
41                     result += 'sat';
42                 } else if (number === 2 || number === 3 || number === 4) {
43                     result += 'sata';
44                 } else {
45                     result += 'sati';
46                 }
47                 return result;
48             case 'dd':
49                 if (number === 1) {
50                     result += 'dan';
51                 } else {
52                     result += 'dana';
53                 }
54                 return result;
55             case 'MM':
56                 if (number === 1) {
57                     result += 'mjesec';
58                 } else if (number === 2 || number === 3 || number === 4) {
59                     result += 'mjeseca';
60                 } else {
61                     result += 'mjeseci';
62                 }
63                 return result;
64             case 'yy':
65                 if (number === 1) {
66                     result += 'godina';
67                 } else if (number === 2 || number === 3 || number === 4) {
68                     result += 'godine';
69                 } else {
70                     result += 'godina';
71                 }
72                 return result;
73         }
74     }
76     var hr = moment.defineLocale('hr', {
77         months: {
78             format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
79                 '_'
80             ),
81             standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
82                 '_'
83             ),
84         },
85         monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
86             '_'
87         ),
88         monthsParseExact: true,
89         weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
90             '_'
91         ),
92         weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
93         weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
94         weekdaysParseExact: true,
95         longDateFormat: {
96             LT: 'H:mm',
97             LTS: 'H:mm:ss',
98             L: 'DD.MM.YYYY',
99             LL: 'Do MMMM YYYY',
100             LLL: 'Do MMMM YYYY H:mm',
101             LLLL: 'dddd, Do MMMM YYYY H:mm',
102         },
103         calendar: {
104             sameDay: '[danas u] LT',
105             nextDay: '[sutra u] LT',
106             nextWeek: function () {
107                 switch (this.day()) {
108                     case 0:
109                         return '[u] [nedjelju] [u] LT';
110                     case 3:
111                         return '[u] [srijedu] [u] LT';
112                     case 6:
113                         return '[u] [subotu] [u] LT';
114                     case 1:
115                     case 2:
116                     case 4:
117                     case 5:
118                         return '[u] dddd [u] LT';
119                 }
120             },
121             lastDay: '[jučer u] LT',
122             lastWeek: function () {
123                 switch (this.day()) {
124                     case 0:
125                         return '[prošlu] [nedjelju] [u] LT';
126                     case 3:
127                         return '[prošlu] [srijedu] [u] LT';
128                     case 6:
129                         return '[prošle] [subote] [u] LT';
130                     case 1:
131                     case 2:
132                     case 4:
133                     case 5:
134                         return '[prošli] dddd [u] LT';
135                 }
136             },
137             sameElse: 'L',
138         },
139         relativeTime: {
140             future: 'za %s',
141             past: 'prije %s',
142             s: 'par sekundi',
143             ss: translate,
144             m: translate,
145             mm: translate,
146             h: translate,
147             hh: translate,
148             d: 'dan',
149             dd: translate,
150             M: 'mjesec',
151             MM: translate,
152             y: 'godinu',
153             yy: translate,
154         },
155         dayOfMonthOrdinalParse: /\d{1,2}\./,
156         ordinal: '%d.',
157         week: {
158             dow: 1, // Monday is the first day of the week.
159             doy: 7, // The week that contains Jan 7th is the first week of the year.
160         },
161     });
163     return hr;
165 })));