1 // moment.js locale configuration
2 // locale : polish (pl)
3 // author : Rafal Hirsz : https://github.com/evoL
6 if (typeof define
=== 'function' && define
.amd
) {
7 define(['moment'], factory
); // AMD
8 } else if (typeof exports
=== 'object') {
9 module
.exports
= factory(require('../moment')); // Node
11 factory((typeof global
!== 'undefined' ? global
: this).moment
); // node or other global
14 var monthsNominative
= 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),
15 monthsSubjective
= 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
18 return (n
% 10 < 5) && (n
% 10 > 1) && ((~~(n
/ 10) % 10) !== 1);
21 function translate(number
, withoutSuffix
, key
) {
22 var result
= number
+ ' ';
25 return withoutSuffix
? 'minuta' : 'minutę';
27 return result
+ (plural(number
) ? 'minuty' : 'minut');
29 return withoutSuffix
? 'godzina' : 'godzinę';
31 return result
+ (plural(number
) ? 'godziny' : 'godzin');
33 return result
+ (plural(number
) ? 'miesiące' : 'miesięcy');
35 return result
+ (plural(number
) ? 'lata' : 'lat');
39 return moment
.defineLocale('pl', {
40 months : function (momentToFormat
, format
) {
41 if (/D MMMM/.test(format
)) {
42 return monthsSubjective
[momentToFormat
.month()];
44 return monthsNominative
[momentToFormat
.month()];
47 monthsShort
: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
48 weekdays
: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
49 weekdaysShort
: 'nie_pon_wt_śr_czw_pt_sb'.split('_'),
50 weekdaysMin
: 'N_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
56 LLL
: 'D MMMM YYYY LT',
57 LLLL
: 'dddd, D MMMM YYYY LT'
60 sameDay
: '[Dziś o] LT',
61 nextDay
: '[Jutro o] LT',
62 nextWeek
: '[W] dddd [o] LT',
63 lastDay
: '[Wczoraj o] LT',
64 lastWeek: function () {
67 return '[W zeszłą niedzielę o] LT';
69 return '[W zeszłą środę o] LT';
71 return '[W zeszłą sobotę o] LT';
73 return '[W zeszły] dddd [o] LT';
93 ordinalParse
: /\d{1,2}\./,
96 dow
: 1, // Monday is the first day of the week.
97 doy
: 4 // The week that contains Jan 4th is the first week of the year.