//! moment.js locale configuration
-//! locale : Polish [pl]
-//! author : Rafal Hirsz : https://github.com/evoL
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
-}(this, function (moment) { 'use strict';
+}(this, (function (moment) { 'use strict';
var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),
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':
var pl = moment.defineLocale('pl', {
months : function (momentToFormat, format) {
- if (format === '') {
+ if (!momentToFormat) {
+ return monthsNominative;
+ } else if (format === '') {
// Hack: if format empty we know this is used to generate
// RegExp by moment. Give then back both valid forms of months
// in RegExp ready format.
},
monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
- weekdaysShort : 'nie_pon_wt_śr_czw_pt_sb'.split('_'),
+ weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
longDateFormat : {
LT : 'HH:mm',
calendar : {
sameDay: '[Dziś o] LT',
nextDay: '[Jutro o] LT',
- nextWeek: '[W] dddd [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()) {
future : 'za %s',
past : '%s temu',
s : 'kilka sekund',
+ ss : translate,
m : translate,
mm : translate,
h : translate,
y : 'rok',
yy : translate
},
- ordinalParse: /\d{1,2}\./,
+ dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
return pl;
-}));
\ No newline at end of file
+})));