1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-05 16:24:21 +01:00
fab-manager/vendor/assets/components/moment/locale/lv.js

95 lines
3.8 KiB
JavaScript
Raw Normal View History

2015-05-05 03:10:25 +02:00
//! moment.js locale configuration
//! locale : latvian (lv)
//! author : Kristaps Karlsons : https://github.com/skakri
2016-03-23 18:39:41 +01:00
//! author : Jānis Elmeris : https://github.com/JanisE
2015-05-05 03:10:25 +02:00
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';
var units = {
2016-03-23 18:39:41 +01:00
'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
'h': 'stundas_stundām_stunda_stundas'.split('_'),
'hh': 'stundas_stundām_stunda_stundas'.split('_'),
'd': 'dienas_dienām_diena_dienas'.split('_'),
'dd': 'dienas_dienām_diena_dienas'.split('_'),
'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
'y': 'gada_gadiem_gads_gadi'.split('_'),
'yy': 'gada_gadiem_gads_gadi'.split('_')
2015-05-05 03:10:25 +02:00
};
2016-03-23 18:39:41 +01:00
/**
* @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
*/
function format(forms, number, withoutSuffix) {
2015-05-05 03:10:25 +02:00
if (withoutSuffix) {
2016-03-23 18:39:41 +01:00
// E.g. "21 minūte", "3 minūtes".
2015-05-05 03:10:25 +02:00
return number % 10 === 1 && number !== 11 ? forms[2] : forms[3];
} else {
2016-03-23 18:39:41 +01:00
// E.g. "21 minūtes" as in "pēc 21 minūtes".
// E.g. "3 minūtēm" as in "pēc 3 minūtēm".
2015-05-05 03:10:25 +02:00
return number % 10 === 1 && number !== 11 ? forms[0] : forms[1];
}
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
2016-03-23 18:39:41 +01:00
function relativeTimeWithSingular(number, withoutSuffix, key) {
return format(units[key], number, withoutSuffix);
}
function relativeSeconds(number, withoutSuffix) {
return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
}
2015-05-05 03:10:25 +02:00
var lv = moment.defineLocale('lv', {
months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),
longDateFormat : {
LT : 'HH:mm',
2016-03-23 18:39:41 +01:00
LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY.',
2015-05-05 03:10:25 +02:00
LL : 'YYYY. [gada] D. MMMM',
2016-03-23 18:39:41 +01:00
LLL : 'YYYY. [gada] D. MMMM, HH:mm',
LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'
2015-05-05 03:10:25 +02:00
},
calendar : {
sameDay : '[Šodien pulksten] LT',
nextDay : '[Rīt pulksten] LT',
nextWeek : 'dddd [pulksten] LT',
lastDay : '[Vakar pulksten] LT',
lastWeek : '[Pagājušā] dddd [pulksten] LT',
sameElse : 'L'
},
relativeTime : {
2016-03-23 18:39:41 +01:00
future : 'pēc %s',
past : 'pirms %s',
s : relativeSeconds,
m : relativeTimeWithSingular,
2015-05-05 03:10:25 +02:00
mm : relativeTimeWithPlural,
2016-03-23 18:39:41 +01:00
h : relativeTimeWithSingular,
2015-05-05 03:10:25 +02:00
hh : relativeTimeWithPlural,
2016-03-23 18:39:41 +01:00
d : relativeTimeWithSingular,
2015-05-05 03:10:25 +02:00
dd : relativeTimeWithPlural,
2016-03-23 18:39:41 +01:00
M : relativeTimeWithSingular,
2015-05-05 03:10:25 +02:00
MM : relativeTimeWithPlural,
2016-03-23 18:39:41 +01:00
y : relativeTimeWithSingular,
2015-05-05 03:10:25 +02:00
yy : relativeTimeWithPlural
},
ordinalParse: /\d{1,2}\./,
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.
}
});
return lv;
}));