1 //! moment.js locale configuration
2 //! locale : Polish [pl]
3 //! author : Rafal Hirsz : https://github.com/evoL
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
) :
10 }(this, function (moment
) { 'use strict';
13 var monthsNominative
= 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),
14 monthsSubjective
= 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
16 return (n
% 10 < 5) && (n
% 10 > 1) && ((~~(n
/ 10) % 10) !== 1);
18 function translate(number
, withoutSuffix
, key
) {
19 var result
= number
+ ' ';
22 return withoutSuffix
? 'minuta' : 'minutę';
24 return result
+ (plural(number
) ? 'minuty' : 'minut');
26 return withoutSuffix
? 'godzina' : 'godzinę';
28 return result
+ (plural(number
) ? 'godziny' : 'godzin');
30 return result
+ (plural(number
) ? 'miesiące' : 'miesięcy');
32 return result
+ (plural(number
) ? 'lata' : 'lat');
36 var pl
= moment
.defineLocale('pl', {
37 months : function (momentToFormat
, format
) {
39 // Hack: if format empty we know this is used to generate
40 // RegExp by moment. Give then back both valid forms of months
41 // in RegExp ready format.
42 return '(' + monthsSubjective
[momentToFormat
.month()] + '|' + monthsNominative
[momentToFormat
.month()] + ')';
43 } else if (/D MMMM/.test(format
)) {
44 return monthsSubjective
[momentToFormat
.month()];
46 return monthsNominative
[momentToFormat
.month()];
49 monthsShort
: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
50 weekdays
: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
51 weekdaysShort
: 'nie_pon_wt_śr_czw_pt_sb'.split('_'),
52 weekdaysMin
: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
58 LLL
: 'D MMMM YYYY HH:mm',
59 LLLL
: 'dddd, D MMMM YYYY HH:mm'
62 sameDay
: '[Dziś o] LT',
63 nextDay
: '[Jutro o] LT',
64 nextWeek
: '[W] dddd [o] LT',
65 lastDay
: '[Wczoraj o] LT',
66 lastWeek: function () {
69 return '[W zeszłą niedzielę o] LT';
71 return '[W zeszłą środę o] LT';
73 return '[W zeszłą sobotę o] LT';
75 return '[W zeszły] dddd [o] LT';
95 ordinalParse
: /\d{1,2}\./,
98 dow
: 1, // Monday is the first day of the week.
99 doy
: 4 // The week that contains Jan 4th is the first week of the year.