1 // moment.js locale configuration
2 // locale : latvian (lv)
3 // author : Kristaps Karlsons : https://github.com/skakri
6 // Comment out broken wrapper, see T145382
7 /*if (typeof define === 'function' && define.amd) {
8 define(['moment'], factory); // AMD
9 } else if (typeof exports === 'object') {
10 module.exports = factory(require('../moment')); // Node
12 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
17 'mm': 'minūti_minūtes_minūte_minūtes',
18 'hh': 'stundu_stundas_stunda_stundas',
19 'dd': 'dienu_dienas_diena_dienas',
20 'MM': 'mēnesi_mēnešus_mēnesis_mēneši',
21 'yy': 'gadu_gadus_gads_gadi'
24 function format(word
, number
, withoutSuffix
) {
25 var forms
= word
.split('_');
27 return number
% 10 === 1 && number
!== 11 ? forms
[2] : forms
[3];
29 return number
% 10 === 1 && number
!== 11 ? forms
[0] : forms
[1];
33 function relativeTimeWithPlural(number
, withoutSuffix
, key
) {
34 return number
+ ' ' + format(units
[key
], number
, withoutSuffix
);
37 return moment
.defineLocale('lv', {
38 months
: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
39 monthsShort
: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
40 weekdays
: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
41 weekdaysShort
: 'Sv_P_O_T_C_Pk_S'.split('_'),
42 weekdaysMin
: 'Sv_P_O_T_C_Pk_S'.split('_'),
47 LL
: 'YYYY. [gada] D. MMMM',
48 LLL
: 'YYYY. [gada] D. MMMM, LT',
49 LLLL
: 'YYYY. [gada] D. MMMM, dddd, LT'
52 sameDay
: '[Šodien pulksten] LT',
53 nextDay
: '[Rīt pulksten] LT',
54 nextWeek
: 'dddd [pulksten] LT',
55 lastDay
: '[Vakar pulksten] LT',
56 lastWeek
: '[Pagājušā] dddd [pulksten] LT',
64 mm
: relativeTimeWithPlural
,
66 hh
: relativeTimeWithPlural
,
68 dd
: relativeTimeWithPlural
,
70 MM
: relativeTimeWithPlural
,
72 yy
: relativeTimeWithPlural
74 ordinalParse
: /\d{1,2}\./,
77 dow
: 1, // Monday is the first day of the week.
78 doy
: 4 // The week that contains Jan 4th is the first week of the year.