LaravelTest
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) {6typeof exports === 'object' && typeof module !== 'undefined'7&& typeof require === 'function' ? factory(require('../moment')) :8typeof define === 'function' && define.amd ? define(['../moment'], factory) :9factory(global.moment)10}(this, (function (moment) { 'use strict';11
12//! moment.js locale configuration13
14function plural(n) {15if (n % 100 === 11) {16return true;17} else if (n % 10 === 1) {18return false;19}20return true;21}22function translate(number, withoutSuffix, key, isFuture) {23var result = number + ' ';24switch (key) {25case 's':26return withoutSuffix || isFuture27? 'nokkrar sekúndur'28: 'nokkrum sekúndum';29case 'ss':30if (plural(number)) {31return (32result +33(withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')34);35}36return result + 'sekúnda';37case 'm':38return withoutSuffix ? 'mínúta' : 'mínútu';39case 'mm':40if (plural(number)) {41return (42result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')43);44} else if (withoutSuffix) {45return result + 'mínúta';46}47return result + 'mínútu';48case 'hh':49if (plural(number)) {50return (51result +52(withoutSuffix || isFuture53? 'klukkustundir'54: 'klukkustundum')55);56}57return result + 'klukkustund';58case 'd':59if (withoutSuffix) {60return 'dagur';61}62return isFuture ? 'dag' : 'degi';63case 'dd':64if (plural(number)) {65if (withoutSuffix) {66return result + 'dagar';67}68return result + (isFuture ? 'daga' : 'dögum');69} else if (withoutSuffix) {70return result + 'dagur';71}72return result + (isFuture ? 'dag' : 'degi');73case 'M':74if (withoutSuffix) {75return 'mánuður';76}77return isFuture ? 'mánuð' : 'mánuði';78case 'MM':79if (plural(number)) {80if (withoutSuffix) {81return result + 'mánuðir';82}83return result + (isFuture ? 'mánuði' : 'mánuðum');84} else if (withoutSuffix) {85return result + 'mánuður';86}87return result + (isFuture ? 'mánuð' : 'mánuði');88case 'y':89return withoutSuffix || isFuture ? 'ár' : 'ári';90case 'yy':91if (plural(number)) {92return result + (withoutSuffix || isFuture ? 'ár' : 'árum');93}94return result + (withoutSuffix || isFuture ? 'ár' : 'ári');95}96}97
98var is = moment.defineLocale('is', {99months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(100'_'101),102monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),103weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(104'_'105),106weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),107weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),108longDateFormat: {109LT: 'H:mm',110LTS: 'H:mm:ss',111L: 'DD.MM.YYYY',112LL: 'D. MMMM YYYY',113LLL: 'D. MMMM YYYY [kl.] H:mm',114LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',115},116calendar: {117sameDay: '[í dag kl.] LT',118nextDay: '[á morgun kl.] LT',119nextWeek: 'dddd [kl.] LT',120lastDay: '[í gær kl.] LT',121lastWeek: '[síðasta] dddd [kl.] LT',122sameElse: 'L',123},124relativeTime: {125future: 'eftir %s',126past: 'fyrir %s síðan',127s: translate,128ss: translate,129m: translate,130mm: translate,131h: 'klukkustund',132hh: translate,133d: translate,134dd: translate,135M: translate,136MM: translate,137y: translate,138yy: translate,139},140dayOfMonthOrdinalParse: /\d{1,2}\./,141ordinal: '%d.',142week: {143dow: 1, // Monday is the first day of the week.144doy: 4, // The week that contains Jan 4th is the first week of the year.145},146});147
148return is;149
150})));151