1 //! moment.js locale configuration
2 //! locale : Latvian [lv]
3 //! author : Kristaps Karlsons : https://github.com/skakri
4 //! author : Jānis Elmeris : https://github.com/JanisE
6 ;(function (global, factory) {
7 typeof exports === 'object' && typeof module !== 'undefined'
8 && typeof require === 'function' ? factory(require('../moment')) :
9 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
10 factory(global.moment)
11 }(this, (function (moment) { 'use strict';
13 //! moment.js locale configuration
16 ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
17 m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
18 mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
19 h: 'stundas_stundām_stunda_stundas'.split('_'),
20 hh: 'stundas_stundām_stunda_stundas'.split('_'),
21 d: 'dienas_dienām_diena_dienas'.split('_'),
22 dd: 'dienas_dienām_diena_dienas'.split('_'),
23 M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
24 MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
25 y: 'gada_gadiem_gads_gadi'.split('_'),
26 yy: 'gada_gadiem_gads_gadi'.split('_'),
29 * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
31 function format(forms, number, withoutSuffix) {
33 // E.g. "21 minūte", "3 minūtes".
34 return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
36 // E.g. "21 minūtes" as in "pēc 21 minūtes".
37 // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
38 return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
41 function relativeTimeWithPlural(number, withoutSuffix, key) {
42 return number + ' ' + format(units[key], number, withoutSuffix);
44 function relativeTimeWithSingular(number, withoutSuffix, key) {
45 return format(units[key], number, withoutSuffix);
47 function relativeSeconds(number, withoutSuffix) {
48 return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
51 var lv = moment.defineLocale('lv', {
52 months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
55 monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
56 weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
59 weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
60 weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
61 weekdaysParseExact: true,
66 LL: 'YYYY. [gada] D. MMMM',
67 LLL: 'YYYY. [gada] D. MMMM, HH:mm',
68 LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
71 sameDay: '[Šodien pulksten] LT',
72 nextDay: '[Rīt pulksten] LT',
73 nextWeek: 'dddd [pulksten] LT',
74 lastDay: '[Vakar pulksten] LT',
75 lastWeek: '[Pagājušā] dddd [pulksten] LT',
82 ss: relativeTimeWithPlural,
83 m: relativeTimeWithSingular,
84 mm: relativeTimeWithPlural,
85 h: relativeTimeWithSingular,
86 hh: relativeTimeWithPlural,
87 d: relativeTimeWithSingular,
88 dd: relativeTimeWithPlural,
89 M: relativeTimeWithSingular,
90 MM: relativeTimeWithPlural,
91 y: relativeTimeWithSingular,
92 yy: relativeTimeWithPlural,
94 dayOfMonthOrdinalParse: /\d{1,2}\./,
97 dow: 1, // Monday is the first day of the week.
98 doy: 4, // The week that contains Jan 4th is the first week of the year.