2016-02-05 15:42:48 -05:00
|
|
|
//! moment.js locale configuration
|
2020-11-10 20:34:26 -05:00
|
|
|
//! locale : Polish [pl]
|
|
|
|
//! author : Rafal Hirsz : https://github.com/evoL
|
2016-02-05 15:42:48 -05:00
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
2017-04-20 00:24:20 -04:00
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
2016-02-05 15:42:48 -05:00
|
|
|
factory(global.moment)
|
2017-04-20 00:24:20 -04:00
|
|
|
}(this, (function (moment) { 'use strict';
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2020-11-10 20:34:26 -05:00
|
|
|
//! moment.js locale configuration
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2020-11-10 20:34:26 -05:00
|
|
|
var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsParse = [
|
|
|
|
/^sty/i,
|
|
|
|
/^lut/i,
|
|
|
|
/^mar/i,
|
|
|
|
/^kwi/i,
|
|
|
|
/^maj/i,
|
|
|
|
/^cze/i,
|
|
|
|
/^lip/i,
|
|
|
|
/^sie/i,
|
|
|
|
/^wrz/i,
|
|
|
|
/^paź/i,
|
|
|
|
/^lis/i,
|
|
|
|
/^gru/i,
|
|
|
|
];
|
2018-04-26 03:15:53 -04:00
|
|
|
function plural(n) {
|
2020-11-10 20:34:26 -05:00
|
|
|
return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
function translate(number, withoutSuffix, key) {
|
|
|
|
var result = number + ' ';
|
|
|
|
switch (key) {
|
|
|
|
case 'ss':
|
|
|
|
return result + (plural(number) ? 'sekundy' : 'sekund');
|
|
|
|
case 'm':
|
|
|
|
return withoutSuffix ? 'minuta' : 'minutę';
|
|
|
|
case 'mm':
|
|
|
|
return result + (plural(number) ? 'minuty' : 'minut');
|
|
|
|
case 'h':
|
2020-11-10 20:34:26 -05:00
|
|
|
return withoutSuffix ? 'godzina' : 'godzinę';
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'hh':
|
|
|
|
return result + (plural(number) ? 'godziny' : 'godzin');
|
2020-11-10 20:34:26 -05:00
|
|
|
case 'ww':
|
|
|
|
return result + (plural(number) ? 'tygodnie' : 'tygodni');
|
2018-04-26 03:15:53 -04:00
|
|
|
case 'MM':
|
|
|
|
return result + (plural(number) ? 'miesiące' : 'miesięcy');
|
|
|
|
case 'yy':
|
|
|
|
return result + (plural(number) ? 'lata' : 'lat');
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
var pl = moment.defineLocale('pl', {
|
2020-11-10 20:34:26 -05:00
|
|
|
months: function (momentToFormat, format) {
|
2018-04-26 03:15:53 -04:00
|
|
|
if (!momentToFormat) {
|
|
|
|
return monthsNominative;
|
|
|
|
} else if (/D MMMM/.test(format)) {
|
|
|
|
return monthsSubjective[momentToFormat.month()];
|
|
|
|
} else {
|
|
|
|
return monthsNominative[momentToFormat.month()];
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
2014-08-20 14:41:50 -04:00
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
|
|
|
|
monthsParse: monthsParse,
|
|
|
|
longMonthsParse: monthsParse,
|
|
|
|
shortMonthsParse: monthsParse,
|
|
|
|
weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
|
|
|
|
weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
|
|
|
|
longDateFormat: {
|
|
|
|
LT: 'HH:mm',
|
|
|
|
LTS: 'HH:mm:ss',
|
|
|
|
L: 'DD.MM.YYYY',
|
|
|
|
LL: 'D MMMM YYYY',
|
|
|
|
LLL: 'D MMMM YYYY HH:mm',
|
|
|
|
LLLL: 'dddd, D MMMM YYYY HH:mm',
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
calendar: {
|
2018-04-26 03:15:53 -04:00
|
|
|
sameDay: '[Dziś o] LT',
|
|
|
|
nextDay: '[Jutro o] LT',
|
|
|
|
nextWeek: function () {
|
|
|
|
switch (this.day()) {
|
|
|
|
case 0:
|
|
|
|
return '[W niedzielę o] LT';
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
return '[We wtorek o] LT';
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
return '[W środę o] LT';
|
|
|
|
|
|
|
|
case 6:
|
|
|
|
return '[W sobotę o] LT';
|
|
|
|
|
|
|
|
default:
|
|
|
|
return '[W] dddd [o] LT';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
lastDay: '[Wczoraj o] LT',
|
|
|
|
lastWeek: function () {
|
|
|
|
switch (this.day()) {
|
|
|
|
case 0:
|
|
|
|
return '[W zeszłą niedzielę o] LT';
|
|
|
|
case 3:
|
|
|
|
return '[W zeszłą środę o] LT';
|
|
|
|
case 6:
|
|
|
|
return '[W zeszłą sobotę o] LT';
|
|
|
|
default:
|
|
|
|
return '[W zeszły] dddd [o] LT';
|
|
|
|
}
|
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
sameElse: 'L',
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
relativeTime: {
|
|
|
|
future: 'za %s',
|
|
|
|
past: '%s temu',
|
|
|
|
s: 'kilka sekund',
|
|
|
|
ss: translate,
|
|
|
|
m: translate,
|
|
|
|
mm: translate,
|
|
|
|
h: translate,
|
|
|
|
hh: translate,
|
|
|
|
d: '1 dzień',
|
|
|
|
dd: '%d dni',
|
|
|
|
w: 'tydzień',
|
|
|
|
ww: translate,
|
|
|
|
M: 'miesiąc',
|
|
|
|
MM: translate,
|
|
|
|
y: 'rok',
|
|
|
|
yy: translate,
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
2020-11-10 20:34:26 -05:00
|
|
|
ordinal: '%d.',
|
|
|
|
week: {
|
|
|
|
dow: 1, // Monday is the first day of the week.
|
|
|
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
|
|
},
|
2018-04-26 03:15:53 -04:00
|
|
|
});
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
return pl;
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
})));
|