LaravelTest

Форк
0
150 строк · 5.2 Кб
1
//! moment.js locale configuration
2
//! locale : Icelandic [is]
3
//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
4

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';
11

12
    //! moment.js locale configuration
13

14
    function plural(n) {
15
        if (n % 100 === 11) {
16
            return true;
17
        } else if (n % 10 === 1) {
18
            return false;
19
        }
20
        return true;
21
    }
22
    function translate(number, withoutSuffix, key, isFuture) {
23
        var result = number + ' ';
24
        switch (key) {
25
            case 's':
26
                return withoutSuffix || isFuture
27
                    ? 'nokkrar sekúndur'
28
                    : 'nokkrum sekúndum';
29
            case 'ss':
30
                if (plural(number)) {
31
                    return (
32
                        result +
33
                        (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
34
                    );
35
                }
36
                return result + 'sekúnda';
37
            case 'm':
38
                return withoutSuffix ? 'mínúta' : 'mínútu';
39
            case 'mm':
40
                if (plural(number)) {
41
                    return (
42
                        result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
43
                    );
44
                } else if (withoutSuffix) {
45
                    return result + 'mínúta';
46
                }
47
                return result + 'mínútu';
48
            case 'hh':
49
                if (plural(number)) {
50
                    return (
51
                        result +
52
                        (withoutSuffix || isFuture
53
                            ? 'klukkustundir'
54
                            : 'klukkustundum')
55
                    );
56
                }
57
                return result + 'klukkustund';
58
            case 'd':
59
                if (withoutSuffix) {
60
                    return 'dagur';
61
                }
62
                return isFuture ? 'dag' : 'degi';
63
            case 'dd':
64
                if (plural(number)) {
65
                    if (withoutSuffix) {
66
                        return result + 'dagar';
67
                    }
68
                    return result + (isFuture ? 'daga' : 'dögum');
69
                } else if (withoutSuffix) {
70
                    return result + 'dagur';
71
                }
72
                return result + (isFuture ? 'dag' : 'degi');
73
            case 'M':
74
                if (withoutSuffix) {
75
                    return 'mánuður';
76
                }
77
                return isFuture ? 'mánuð' : 'mánuði';
78
            case 'MM':
79
                if (plural(number)) {
80
                    if (withoutSuffix) {
81
                        return result + 'mánuðir';
82
                    }
83
                    return result + (isFuture ? 'mánuði' : 'mánuðum');
84
                } else if (withoutSuffix) {
85
                    return result + 'mánuður';
86
                }
87
                return result + (isFuture ? 'mánuð' : 'mánuði');
88
            case 'y':
89
                return withoutSuffix || isFuture ? 'ár' : 'ári';
90
            case 'yy':
91
                if (plural(number)) {
92
                    return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
93
                }
94
                return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
95
        }
96
    }
97

98
    var is = moment.defineLocale('is', {
99
        months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
100
            '_'
101
        ),
102
        monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
103
        weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
104
            '_'
105
        ),
106
        weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
107
        weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
108
        longDateFormat: {
109
            LT: 'H:mm',
110
            LTS: 'H:mm:ss',
111
            L: 'DD.MM.YYYY',
112
            LL: 'D. MMMM YYYY',
113
            LLL: 'D. MMMM YYYY [kl.] H:mm',
114
            LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
115
        },
116
        calendar: {
117
            sameDay: '[í dag kl.] LT',
118
            nextDay: '[á morgun kl.] LT',
119
            nextWeek: 'dddd [kl.] LT',
120
            lastDay: '[í gær kl.] LT',
121
            lastWeek: '[síðasta] dddd [kl.] LT',
122
            sameElse: 'L',
123
        },
124
        relativeTime: {
125
            future: 'eftir %s',
126
            past: 'fyrir %s síðan',
127
            s: translate,
128
            ss: translate,
129
            m: translate,
130
            mm: translate,
131
            h: 'klukkustund',
132
            hh: translate,
133
            d: translate,
134
            dd: translate,
135
            M: translate,
136
            MM: translate,
137
            y: translate,
138
            yy: translate,
139
        },
140
        dayOfMonthOrdinalParse: /\d{1,2}\./,
141
        ordinal: '%d.',
142
        week: {
143
            dow: 1, // Monday is the first day of the week.
144
            doy: 4, // The week that contains Jan 4th is the first week of the year.
145
        },
146
    });
147

148
    return is;
149

150
})));
151

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

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

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

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