1 // moment.js language configuration
2 // language : latvian (lv)
3 // author : Kristaps Karlsons : https://github.com/skakri
6 if (typeof define
=== 'function' && define
.amd
) {
7 define(['moment'], factory
); // AMD
8 } else if (typeof exports
=== 'object') {
9 module
.exports
= factory(require('../moment')); // Node
11 factory(window
.moment
); // Browser global
15 'mm': 'minūti_minūtes_minūte_minūtes',
16 'hh': 'stundu_stundas_stunda_stundas',
17 'dd': 'dienu_dienas_diena_dienas',
18 'MM': 'mēnesi_mēnešus_mēnesis_mēneši',
19 'yy': 'gadu_gadus_gads_gadi'
22 function format(word
, number
, withoutSuffix
) {
23 var forms
= word
.split('_');
25 return number
% 10 === 1 && number
!== 11 ? forms
[2] : forms
[3];
27 return number
% 10 === 1 && number
!== 11 ? forms
[0] : forms
[1];
31 function relativeTimeWithPlural(number
, withoutSuffix
, key
) {
32 return number
+ ' ' + format(units
[key
], number
, withoutSuffix
);
35 return moment
.lang('lv', {
36 months
: "janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),
37 monthsShort
: "jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),
38 weekdays
: "svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),
39 weekdaysShort
: "Sv_P_O_T_C_Pk_S".split("_"),
40 weekdaysMin
: "Sv_P_O_T_C_Pk_S".split("_"),
44 LL
: "YYYY. [gada] D. MMMM",
45 LLL
: "YYYY. [gada] D. MMMM, LT",
46 LLLL
: "YYYY. [gada] D. MMMM, dddd, LT"
49 sameDay
: '[Šodien pulksten] LT',
50 nextDay
: '[Rīt pulksten] LT',
51 nextWeek
: 'dddd [pulksten] LT',
52 lastDay
: '[Vakar pulksten] LT',
53 lastWeek
: '[Pagājušā] dddd [pulksten] LT',
61 mm
: relativeTimeWithPlural
,
63 hh
: relativeTimeWithPlural
,
65 dd
: relativeTimeWithPlural
,
67 MM
: relativeTimeWithPlural
,
69 yy
: relativeTimeWithPlural
73 dow
: 1, // Monday is the first day of the week.
74 doy
: 4 // The week that contains Jan 4th is the first week of the year.