2016-02-05 15:42:48 -05:00
|
|
|
//! moment.js locale configuration
|
2020-11-10 20:34:26 -05:00
|
|
|
//! locale : Finnish [fi]
|
|
|
|
//! author : Tarmo Aidantausta : https://github.com/bleadof
|
2016-02-05 15:42:48 -05:00
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
2017-04-20 00:24:20 -04:00
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
2016-02-05 15:42:48 -05:00
|
|
|
factory(global.moment)
|
2017-04-20 00:24:20 -04:00
|
|
|
}(this, (function (moment) { 'use strict';
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2020-11-10 20:34:26 -05:00
|
|
|
//! moment.js locale configuration
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2020-11-10 20:34:26 -05:00
|
|
|
var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
|
|
|
|
' '
|
|
|
|
),
|
2018-04-26 03:15:53 -04:00
|
|
|
numbersFuture = [
|
2020-11-10 20:34:26 -05:00
|
|
|
'nolla',
|
|
|
|
'yhden',
|
|
|
|
'kahden',
|
|
|
|
'kolmen',
|
|
|
|
'neljän',
|
|
|
|
'viiden',
|
|
|
|
'kuuden',
|
|
|
|
numbersPast[7],
|
|
|
|
numbersPast[8],
|
|
|
|
numbersPast[9],
|
2018-04-26 03:15:53 -04:00
|
|
|
];
|
|
|
|
function translate(number, withoutSuffix, key, isFuture) {
|
|
|
|
var result = '';
|
|
|
|
switch (key) {
|
|
|
|
case 's':
|
|
|
|
return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
|
|
|
|
case 'ss':
|
2020-11-10 20:34:26 -05:00
|
|
|
result = isFuture ? 'sekunnin' : 'sekuntia';
|
|
|
|
break;
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'm':
|
|
|
|
return isFuture ? 'minuutin' : 'minuutti';
|
|
|
|
case 'mm':
|
|
|
|
result = isFuture ? 'minuutin' : 'minuuttia';
|
|
|
|
break;
|
|
|
|
case 'h':
|
|
|
|
return isFuture ? 'tunnin' : 'tunti';
|
|
|
|
case 'hh':
|
|
|
|
result = isFuture ? 'tunnin' : 'tuntia';
|
|
|
|
break;
|
|
|
|
case 'd':
|
|
|
|
return isFuture ? 'päivän' : 'päivä';
|
|
|
|
case 'dd':
|
|
|
|
result = isFuture ? 'päivän' : 'päivää';
|
|
|
|
break;
|
|
|
|
case 'M':
|
|
|
|
return isFuture ? 'kuukauden' : 'kuukausi';
|
|
|
|
case 'MM':
|
|
|
|
result = isFuture ? 'kuukauden' : 'kuukautta';
|
|
|
|
break;
|
|
|
|
case 'y':
|
|
|
|
return isFuture ? 'vuoden' : 'vuosi';
|
|
|
|
case 'yy':
|
|
|
|
result = isFuture ? 'vuoden' : 'vuotta';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
result = verbalNumber(number, isFuture) + ' ' + result;
|
|
|
|
return result;
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
function verbalNumber(number, isFuture) {
|
2020-11-10 20:34:26 -05:00
|
|
|
return number < 10
|
|
|
|
? isFuture
|
|
|
|
? numbersFuture[number]
|
|
|
|
: numbersPast[number]
|
|
|
|
: number;
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
var fi = moment.defineLocale('fi', {
|
2020-11-10 20:34:26 -05:00
|
|
|
months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
|
|
|
|
weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
|
|
|
|
longDateFormat: {
|
|
|
|
LT: 'HH.mm',
|
|
|
|
LTS: 'HH.mm.ss',
|
|
|
|
L: 'DD.MM.YYYY',
|
|
|
|
LL: 'Do MMMM[ta] YYYY',
|
|
|
|
LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
|
|
|
|
LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
|
|
|
|
l: 'D.M.YYYY',
|
|
|
|
ll: 'Do MMM YYYY',
|
|
|
|
lll: 'Do MMM YYYY, [klo] HH.mm',
|
|
|
|
llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
calendar: {
|
|
|
|
sameDay: '[tänään] [klo] LT',
|
|
|
|
nextDay: '[huomenna] [klo] LT',
|
|
|
|
nextWeek: 'dddd [klo] LT',
|
|
|
|
lastDay: '[eilen] [klo] LT',
|
|
|
|
lastWeek: '[viime] dddd[na] [klo] LT',
|
|
|
|
sameElse: 'L',
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
relativeTime: {
|
|
|
|
future: '%s päästä',
|
|
|
|
past: '%s sitten',
|
|
|
|
s: translate,
|
|
|
|
ss: translate,
|
|
|
|
m: translate,
|
|
|
|
mm: translate,
|
|
|
|
h: translate,
|
|
|
|
hh: translate,
|
|
|
|
d: translate,
|
|
|
|
dd: translate,
|
|
|
|
M: translate,
|
|
|
|
MM: translate,
|
|
|
|
y: translate,
|
|
|
|
yy: translate,
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
2020-11-10 20:34:26 -05: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 03:15:53 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
return fi;
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
})));
|