Merge "Revert "Use display name in category page subheadings if provided""
[lhc/web/wiklou.git] / resources / lib / moment / locale / lv.js
1 // moment.js locale configuration
2 // locale : latvian (lv)
3 // author : Kristaps Karlsons : https://github.com/skakri
4
5 (function (factory) {
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
11 } else {
12 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
13 }*/
14 factory(this.moment);
15 }(function (moment) {
16 var units = {
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'
22 };
23
24 function format(word, number, withoutSuffix) {
25 var forms = word.split('_');
26 if (withoutSuffix) {
27 return number % 10 === 1 && number !== 11 ? forms[2] : forms[3];
28 } else {
29 return number % 10 === 1 && number !== 11 ? forms[0] : forms[1];
30 }
31 }
32
33 function relativeTimeWithPlural(number, withoutSuffix, key) {
34 return number + ' ' + format(units[key], number, withoutSuffix);
35 }
36
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('_'),
43 longDateFormat : {
44 LT : 'HH:mm',
45 LTS : 'LT:ss',
46 L : 'DD.MM.YYYY',
47 LL : 'YYYY. [gada] D. MMMM',
48 LLL : 'YYYY. [gada] D. MMMM, LT',
49 LLLL : 'YYYY. [gada] D. MMMM, dddd, LT'
50 },
51 calendar : {
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',
57 sameElse : 'L'
58 },
59 relativeTime : {
60 future : '%s vēlāk',
61 past : '%s agrāk',
62 s : 'dažas sekundes',
63 m : 'minūti',
64 mm : relativeTimeWithPlural,
65 h : 'stundu',
66 hh : relativeTimeWithPlural,
67 d : 'dienu',
68 dd : relativeTimeWithPlural,
69 M : 'mēnesi',
70 MM : relativeTimeWithPlural,
71 y : 'gadu',
72 yy : relativeTimeWithPlural
73 },
74 ordinalParse: /\d{1,2}\./,
75 ordinal : '%d.',
76 week : {
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.
79 }
80 });
81 }));