corrade-nucleus-nucleons – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
10 | office | 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 |
||
5 | |||
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'; |
||
12 | |||
13 | |||
14 | var units = { |
||
15 | 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), |
||
16 | 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), |
||
17 | 'h': 'stundas_stundām_stunda_stundas'.split('_'), |
||
18 | 'hh': 'stundas_stundām_stunda_stundas'.split('_'), |
||
19 | 'd': 'dienas_dienām_diena_dienas'.split('_'), |
||
20 | 'dd': 'dienas_dienām_diena_dienas'.split('_'), |
||
21 | 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), |
||
22 | 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), |
||
23 | 'y': 'gada_gadiem_gads_gadi'.split('_'), |
||
24 | 'yy': 'gada_gadiem_gads_gadi'.split('_') |
||
25 | }; |
||
26 | /** |
||
27 | * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. |
||
28 | */ |
||
29 | function format(forms, number, withoutSuffix) { |
||
30 | if (withoutSuffix) { |
||
31 | // E.g. "21 minūte", "3 minūtes". |
||
32 | return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; |
||
33 | } else { |
||
34 | // E.g. "21 minūtes" as in "pēc 21 minūtes". |
||
35 | // E.g. "3 minūtēm" as in "pēc 3 minūtēm". |
||
36 | return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; |
||
37 | } |
||
38 | } |
||
39 | function relativeTimeWithPlural(number, withoutSuffix, key) { |
||
40 | return number + ' ' + format(units[key], number, withoutSuffix); |
||
41 | } |
||
42 | function relativeTimeWithSingular(number, withoutSuffix, key) { |
||
43 | return format(units[key], number, withoutSuffix); |
||
44 | } |
||
45 | function relativeSeconds(number, withoutSuffix) { |
||
46 | return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; |
||
47 | } |
||
48 | |||
49 | var lv = moment.defineLocale('lv', { |
||
50 | months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), |
||
51 | monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), |
||
52 | weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), |
||
53 | weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), |
||
54 | weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), |
||
55 | weekdaysParseExact : true, |
||
56 | longDateFormat : { |
||
57 | LT : 'HH:mm', |
||
58 | LTS : 'HH:mm:ss', |
||
59 | L : 'DD.MM.YYYY.', |
||
60 | LL : 'YYYY. [gada] D. MMMM', |
||
61 | LLL : 'YYYY. [gada] D. MMMM, HH:mm', |
||
62 | LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' |
||
63 | }, |
||
64 | calendar : { |
||
65 | sameDay : '[Šodien pulksten] LT', |
||
66 | nextDay : '[Rīt pulksten] LT', |
||
67 | nextWeek : 'dddd [pulksten] LT', |
||
68 | lastDay : '[Vakar pulksten] LT', |
||
69 | lastWeek : '[Pagājušā] dddd [pulksten] LT', |
||
70 | sameElse : 'L' |
||
71 | }, |
||
72 | relativeTime : { |
||
73 | future : 'pēc %s', |
||
74 | past : 'pirms %s', |
||
75 | s : relativeSeconds, |
||
76 | m : relativeTimeWithSingular, |
||
77 | mm : relativeTimeWithPlural, |
||
78 | h : relativeTimeWithSingular, |
||
79 | hh : relativeTimeWithPlural, |
||
80 | d : relativeTimeWithSingular, |
||
81 | dd : relativeTimeWithPlural, |
||
82 | M : relativeTimeWithSingular, |
||
83 | MM : relativeTimeWithPlural, |
||
84 | y : relativeTimeWithSingular, |
||
85 | yy : relativeTimeWithPlural |
||
86 | }, |
||
87 | dayOfMonthOrdinalParse: /\d{1,2}\./, |
||
88 | ordinal : '%d.', |
||
89 | week : { |
||
90 | dow : 1, // Monday is the first day of the week. |
||
91 | doy : 4 // The week that contains Jan 4th is the first week of the year. |
||
92 | } |
||
93 | }); |
||
94 | |||
95 | return lv; |
||
96 | |||
97 | }))); |