PageRenderTime 25ms CodeModel.GetById 13ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/moment/locale/lv.js

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