Brought in another asset for Ray's eye form: moment
[openemr.git] / public / assets / moment-2-13-0 / src / locale / pl.js
blobfde1bb2e6b35bb8810f2e68deb8ccef54628f503
1 //! moment.js locale configuration
2 //! locale : polish (pl)
3 //! author : Rafal Hirsz : https://github.com/evoL
5 import moment from '../moment';
7 var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),
8     monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
9 function plural(n) {
10     return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
12 function translate(number, withoutSuffix, key) {
13     var result = number + ' ';
14     switch (key) {
15     case 'm':
16         return withoutSuffix ? 'minuta' : 'minutę';
17     case 'mm':
18         return result + (plural(number) ? 'minuty' : 'minut');
19     case 'h':
20         return withoutSuffix  ? 'godzina'  : 'godzinę';
21     case 'hh':
22         return result + (plural(number) ? 'godziny' : 'godzin');
23     case 'MM':
24         return result + (plural(number) ? 'miesiące' : 'miesięcy');
25     case 'yy':
26         return result + (plural(number) ? 'lata' : 'lat');
27     }
30 export default moment.defineLocale('pl', {
31     months : function (momentToFormat, format) {
32         if (format === '') {
33             // Hack: if format empty we know this is used to generate
34             // RegExp by moment. Give then back both valid forms of months
35             // in RegExp ready format.
36             return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
37         } else if (/D MMMM/.test(format)) {
38             return monthsSubjective[momentToFormat.month()];
39         } else {
40             return monthsNominative[momentToFormat.month()];
41         }
42     },
43     monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
44     weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
45     weekdaysShort : 'nie_pon_wt_śr_czw_pt_sb'.split('_'),
46     weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
47     longDateFormat : {
48         LT : 'HH:mm',
49         LTS : 'HH:mm:ss',
50         L : 'DD.MM.YYYY',
51         LL : 'D MMMM YYYY',
52         LLL : 'D MMMM YYYY HH:mm',
53         LLLL : 'dddd, D MMMM YYYY HH:mm'
54     },
55     calendar : {
56         sameDay: '[Dziś o] LT',
57         nextDay: '[Jutro o] LT',
58         nextWeek: '[W] dddd [o] LT',
59         lastDay: '[Wczoraj o] LT',
60         lastWeek: function () {
61             switch (this.day()) {
62             case 0:
63                 return '[W zeszłą niedzielę o] LT';
64             case 3:
65                 return '[W zeszłą środę o] LT';
66             case 6:
67                 return '[W zeszłą sobotę o] LT';
68             default:
69                 return '[W zeszły] dddd [o] LT';
70             }
71         },
72         sameElse: 'L'
73     },
74     relativeTime : {
75         future : 'za %s',
76         past : '%s temu',
77         s : 'kilka sekund',
78         m : translate,
79         mm : translate,
80         h : translate,
81         hh : translate,
82         d : '1 dzień',
83         dd : '%d dni',
84         M : 'miesiąc',
85         MM : translate,
86         y : 'rok',
87         yy : translate
88     },
89     ordinalParse: /\d{1,2}\./,
90     ordinal : '%d.',
91     week : {
92         dow : 1, // Monday is the first day of the week.
93         doy : 4  // The week that contains Jan 4th is the first week of the year.
94     }
95 });