2016-02-06 04:42:48 +08:00
|
|
|
//! moment.js locale configuration
|
2020-11-11 09:34:26 +08:00
|
|
|
//! locale : Icelandic [is]
|
|
|
|
//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
|
2016-02-06 04:42:48 +08:00
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
2017-04-20 12:24:20 +08:00
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
2016-02-06 04:42:48 +08:00
|
|
|
factory(global.moment)
|
2017-04-20 12:24:20 +08:00
|
|
|
}(this, (function (moment) { 'use strict';
|
2016-02-06 04:42:48 +08:00
|
|
|
|
2020-11-11 09:34:26 +08:00
|
|
|
//! moment.js locale configuration
|
2014-08-21 02:41:50 +08:00
|
|
|
|
2018-04-26 15:15:53 +08:00
|
|
|
function plural(n) {
|
|
|
|
if (n % 100 === 11) {
|
|
|
|
return true;
|
|
|
|
} else if (n % 10 === 1) {
|
|
|
|
return false;
|
|
|
|
}
|
2014-08-21 02:41:50 +08:00
|
|
|
return true;
|
|
|
|
}
|
2018-04-26 15:15:53 +08:00
|
|
|
function translate(number, withoutSuffix, key, isFuture) {
|
|
|
|
var result = number + ' ';
|
|
|
|
switch (key) {
|
|
|
|
case 's':
|
2020-11-11 09:34:26 +08:00
|
|
|
return withoutSuffix || isFuture
|
|
|
|
? 'nokkrar sekúndur'
|
|
|
|
: 'nokkrum sekúndum';
|
2018-04-26 15:15:53 +08:00
|
|
|
case 'ss':
|
|
|
|
if (plural(number)) {
|
2020-11-11 09:34:26 +08:00
|
|
|
return (
|
|
|
|
result +
|
|
|
|
(withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
|
|
|
|
);
|
2018-04-26 15:15:53 +08:00
|
|
|
}
|
|
|
|
return result + 'sekúnda';
|
|
|
|
case 'm':
|
|
|
|
return withoutSuffix ? 'mínúta' : 'mínútu';
|
|
|
|
case 'mm':
|
|
|
|
if (plural(number)) {
|
2020-11-11 09:34:26 +08:00
|
|
|
return (
|
|
|
|
result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
|
|
|
|
);
|
2018-04-26 15:15:53 +08:00
|
|
|
} else if (withoutSuffix) {
|
|
|
|
return result + 'mínúta';
|
|
|
|
}
|
|
|
|
return result + 'mínútu';
|
|
|
|
case 'hh':
|
|
|
|
if (plural(number)) {
|
2020-11-11 09:34:26 +08:00
|
|
|
return (
|
|
|
|
result +
|
|
|
|
(withoutSuffix || isFuture
|
|
|
|
? 'klukkustundir'
|
|
|
|
: 'klukkustundum')
|
|
|
|
);
|
2018-04-26 15:15:53 +08:00
|
|
|
}
|
|
|
|
return result + 'klukkustund';
|
|
|
|
case 'd':
|
2014-08-21 02:41:50 +08:00
|
|
|
if (withoutSuffix) {
|
2018-04-26 15:15:53 +08:00
|
|
|
return 'dagur';
|
|
|
|
}
|
|
|
|
return isFuture ? 'dag' : 'degi';
|
|
|
|
case 'dd':
|
|
|
|
if (plural(number)) {
|
|
|
|
if (withoutSuffix) {
|
|
|
|
return result + 'dagar';
|
|
|
|
}
|
|
|
|
return result + (isFuture ? 'daga' : 'dögum');
|
|
|
|
} else if (withoutSuffix) {
|
|
|
|
return result + 'dagur';
|
2014-08-21 02:41:50 +08:00
|
|
|
}
|
2018-04-26 15:15:53 +08:00
|
|
|
return result + (isFuture ? 'dag' : 'degi');
|
|
|
|
case 'M':
|
2014-08-21 02:41:50 +08:00
|
|
|
if (withoutSuffix) {
|
2018-04-26 15:15:53 +08:00
|
|
|
return 'mánuður';
|
2014-08-21 02:41:50 +08:00
|
|
|
}
|
2018-04-26 15:15:53 +08:00
|
|
|
return isFuture ? 'mánuð' : 'mánuði';
|
|
|
|
case 'MM':
|
|
|
|
if (plural(number)) {
|
|
|
|
if (withoutSuffix) {
|
|
|
|
return result + 'mánuðir';
|
|
|
|
}
|
|
|
|
return result + (isFuture ? 'mánuði' : 'mánuðum');
|
|
|
|
} else if (withoutSuffix) {
|
|
|
|
return result + 'mánuður';
|
|
|
|
}
|
|
|
|
return result + (isFuture ? 'mánuð' : 'mánuði');
|
|
|
|
case 'y':
|
|
|
|
return withoutSuffix || isFuture ? 'ár' : 'ári';
|
|
|
|
case 'yy':
|
|
|
|
if (plural(number)) {
|
|
|
|
return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
|
|
|
|
}
|
|
|
|
return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
|
|
|
|
}
|
2014-08-21 02:41:50 +08:00
|
|
|
}
|
|
|
|
|
2018-04-26 15:15:53 +08:00
|
|
|
var is = moment.defineLocale('is', {
|
2020-11-11 09:34:26 +08:00
|
|
|
months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
|
|
|
|
weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
|
|
|
|
weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
|
|
|
|
longDateFormat: {
|
|
|
|
LT: 'H:mm',
|
|
|
|
LTS: 'H:mm:ss',
|
|
|
|
L: 'DD.MM.YYYY',
|
|
|
|
LL: 'D. MMMM YYYY',
|
|
|
|
LLL: 'D. MMMM YYYY [kl.] H:mm',
|
|
|
|
LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
|
2018-04-26 15:15:53 +08:00
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
calendar: {
|
|
|
|
sameDay: '[í dag kl.] LT',
|
|
|
|
nextDay: '[á morgun kl.] LT',
|
|
|
|
nextWeek: 'dddd [kl.] LT',
|
|
|
|
lastDay: '[í gær kl.] LT',
|
|
|
|
lastWeek: '[síðasta] dddd [kl.] LT',
|
|
|
|
sameElse: 'L',
|
2018-04-26 15:15:53 +08:00
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
relativeTime: {
|
|
|
|
future: 'eftir %s',
|
|
|
|
past: 'fyrir %s síðan',
|
|
|
|
s: translate,
|
|
|
|
ss: translate,
|
|
|
|
m: translate,
|
|
|
|
mm: translate,
|
|
|
|
h: 'klukkustund',
|
|
|
|
hh: translate,
|
|
|
|
d: translate,
|
|
|
|
dd: translate,
|
|
|
|
M: translate,
|
|
|
|
MM: translate,
|
|
|
|
y: translate,
|
|
|
|
yy: translate,
|
2018-04-26 15:15:53 +08:00
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
2020-11-11 09:34:26 +08:00
|
|
|
ordinal: '%d.',
|
|
|
|
week: {
|
|
|
|
dow: 1, // Monday is the first day of the week.
|
|
|
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
|
|
},
|
2018-04-26 15:15:53 +08:00
|
|
|
});
|
2016-02-06 04:42:48 +08:00
|
|
|
|
2018-04-26 15:15:53 +08:00
|
|
|
return is;
|
2016-02-06 04:42:48 +08:00
|
|
|
|
2017-04-20 12:24:20 +08:00
|
|
|
})));
|