Merge "objectcache: use INTERIM_KEY_TTL constant in WANObjectCache for readability"
[lhc/web/wiklou.git] / resources / lib / moment / locale / pl.js
1 //! moment.js locale configuration
2 //! locale : Polish [pl]
3 //! author : Rafal Hirsz : https://github.com/evoL
4
5 ;(function (global, factory) {
6 typeof exports === 'object' && typeof module !== 'undefined'
7 && typeof require === 'function' ? factory(require('../moment')) :
8 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
9 factory(global.moment)
10 }(this, (function (moment) { 'use strict';
11
12
13 var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
14 var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
15 function plural(n) {
16 return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
17 }
18 function translate(number, withoutSuffix, key) {
19 var result = number + ' ';
20 switch (key) {
21 case 'm':
22 return withoutSuffix ? 'minuta' : 'minutę';
23 case 'mm':
24 return result + (plural(number) ? 'minuty' : 'minut');
25 case 'h':
26 return withoutSuffix ? 'godzina' : 'godzinę';
27 case 'hh':
28 return result + (plural(number) ? 'godziny' : 'godzin');
29 case 'MM':
30 return result + (plural(number) ? 'miesiące' : 'miesięcy');
31 case 'yy':
32 return result + (plural(number) ? 'lata' : 'lat');
33 }
34 }
35
36 var pl = moment.defineLocale('pl', {
37 months : function (momentToFormat, format) {
38 if (!momentToFormat) {
39 return monthsNominative;
40 } else if (format === '') {
41 // Hack: if format empty we know this is used to generate
42 // RegExp by moment. Give then back both valid forms of months
43 // in RegExp ready format.
44 return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
45 } else if (/D MMMM/.test(format)) {
46 return monthsSubjective[momentToFormat.month()];
47 } else {
48 return monthsNominative[momentToFormat.month()];
49 }
50 },
51 monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
52 weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
53 weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
54 weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
55 longDateFormat : {
56 LT : 'HH:mm',
57 LTS : 'HH:mm:ss',
58 L : 'DD.MM.YYYY',
59 LL : 'D MMMM YYYY',
60 LLL : 'D MMMM YYYY HH:mm',
61 LLLL : 'dddd, D MMMM YYYY HH:mm'
62 },
63 calendar : {
64 sameDay: '[Dziś o] LT',
65 nextDay: '[Jutro o] LT',
66 nextWeek: function () {
67 switch (this.day()) {
68 case 0:
69 return '[W niedzielę o] LT';
70
71 case 2:
72 return '[We wtorek o] LT';
73
74 case 3:
75 return '[W środę o] LT';
76
77 case 6:
78 return '[W sobotę o] LT';
79
80 default:
81 return '[W] dddd [o] LT';
82 }
83 },
84 lastDay: '[Wczoraj o] LT',
85 lastWeek: function () {
86 switch (this.day()) {
87 case 0:
88 return '[W zeszłą niedzielę o] LT';
89 case 3:
90 return '[W zeszłą środę o] LT';
91 case 6:
92 return '[W zeszłą sobotę o] LT';
93 default:
94 return '[W zeszły] dddd [o] LT';
95 }
96 },
97 sameElse: 'L'
98 },
99 relativeTime : {
100 future : 'za %s',
101 past : '%s temu',
102 s : 'kilka sekund',
103 m : translate,
104 mm : translate,
105 h : translate,
106 hh : translate,
107 d : '1 dzień',
108 dd : '%d dni',
109 M : 'miesiąc',
110 MM : translate,
111 y : 'rok',
112 yy : translate
113 },
114 dayOfMonthOrdinalParse: /\d{1,2}\./,
115 ordinal : '%d.',
116 week : {
117 dow : 1, // Monday is the first day of the week.
118 doy : 4 // The week that contains Jan 4th is the first week of the year.
119 }
120 });
121
122 return pl;
123
124 })));