GPQAPP

Форк
0
160 строк · 5.2 Кб
1
//! moment.js locale configuration
2
//! locale : Bosnian [bs]
3
//! author : Nedim Cholich : https://github.com/frontyard
4
//! based on (hr) translation by Bojan Marković
5

6
;(function (global, factory) {
7
   typeof exports === 'object' && typeof module !== 'undefined'
8
       && typeof require === 'function' ? factory(require('../moment')) :
9
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
10
   factory(global.moment)
11
}(this, (function (moment) { 'use strict';
12

13
    //! moment.js locale configuration
14

15
    function translate(number, withoutSuffix, key) {
16
        var result = number + ' ';
17
        switch (key) {
18
            case 'ss':
19
                if (number === 1) {
20
                    result += 'sekunda';
21
                } else if (number === 2 || number === 3 || number === 4) {
22
                    result += 'sekunde';
23
                } else {
24
                    result += 'sekundi';
25
                }
26
                return result;
27
            case 'm':
28
                return withoutSuffix ? 'jedna minuta' : 'jedne minute';
29
            case 'mm':
30
                if (number === 1) {
31
                    result += 'minuta';
32
                } else if (number === 2 || number === 3 || number === 4) {
33
                    result += 'minute';
34
                } else {
35
                    result += 'minuta';
36
                }
37
                return result;
38
            case 'h':
39
                return withoutSuffix ? 'jedan sat' : 'jednog sata';
40
            case 'hh':
41
                if (number === 1) {
42
                    result += 'sat';
43
                } else if (number === 2 || number === 3 || number === 4) {
44
                    result += 'sata';
45
                } else {
46
                    result += 'sati';
47
                }
48
                return result;
49
            case 'dd':
50
                if (number === 1) {
51
                    result += 'dan';
52
                } else {
53
                    result += 'dana';
54
                }
55
                return result;
56
            case 'MM':
57
                if (number === 1) {
58
                    result += 'mjesec';
59
                } else if (number === 2 || number === 3 || number === 4) {
60
                    result += 'mjeseca';
61
                } else {
62
                    result += 'mjeseci';
63
                }
64
                return result;
65
            case 'yy':
66
                if (number === 1) {
67
                    result += 'godina';
68
                } else if (number === 2 || number === 3 || number === 4) {
69
                    result += 'godine';
70
                } else {
71
                    result += 'godina';
72
                }
73
                return result;
74
        }
75
    }
76

77
    var bs = moment.defineLocale('bs', {
78
        months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
79
            '_'
80
        ),
81
        monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
82
            '_'
83
        ),
84
        monthsParseExact: true,
85
        weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
86
            '_'
87
        ),
88
        weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
89
        weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
90
        weekdaysParseExact: true,
91
        longDateFormat: {
92
            LT: 'H:mm',
93
            LTS: 'H:mm:ss',
94
            L: 'DD.MM.YYYY',
95
            LL: 'D. MMMM YYYY',
96
            LLL: 'D. MMMM YYYY H:mm',
97
            LLLL: 'dddd, D. MMMM YYYY H:mm',
98
        },
99
        calendar: {
100
            sameDay: '[danas u] LT',
101
            nextDay: '[sutra u] LT',
102
            nextWeek: function () {
103
                switch (this.day()) {
104
                    case 0:
105
                        return '[u] [nedjelju] [u] LT';
106
                    case 3:
107
                        return '[u] [srijedu] [u] LT';
108
                    case 6:
109
                        return '[u] [subotu] [u] LT';
110
                    case 1:
111
                    case 2:
112
                    case 4:
113
                    case 5:
114
                        return '[u] dddd [u] LT';
115
                }
116
            },
117
            lastDay: '[jučer u] LT',
118
            lastWeek: function () {
119
                switch (this.day()) {
120
                    case 0:
121
                    case 3:
122
                        return '[prošlu] dddd [u] LT';
123
                    case 6:
124
                        return '[prošle] [subote] [u] LT';
125
                    case 1:
126
                    case 2:
127
                    case 4:
128
                    case 5:
129
                        return '[prošli] dddd [u] LT';
130
                }
131
            },
132
            sameElse: 'L',
133
        },
134
        relativeTime: {
135
            future: 'za %s',
136
            past: 'prije %s',
137
            s: 'par sekundi',
138
            ss: translate,
139
            m: translate,
140
            mm: translate,
141
            h: translate,
142
            hh: translate,
143
            d: 'dan',
144
            dd: translate,
145
            M: 'mjesec',
146
            MM: translate,
147
            y: 'godinu',
148
            yy: translate,
149
        },
150
        dayOfMonthOrdinalParse: /\d{1,2}\./,
151
        ordinal: '%d.',
152
        week: {
153
            dow: 1, // Monday is the first day of the week.
154
            doy: 7, // The week that contains Jan 7th is the first week of the year.
155
        },
156
    });
157

158
    return bs;
159

160
})));
161

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.