summaryrefslogtreecommitdiff
path: root/www/lib/moment/src/locale/pl.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/lib/moment/src/locale/pl.js')
-rw-r--r--www/lib/moment/src/locale/pl.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/www/lib/moment/src/locale/pl.js b/www/lib/moment/src/locale/pl.js
index a50011f4..e458ea5a 100644
--- a/www/lib/moment/src/locale/pl.js
+++ b/www/lib/moment/src/locale/pl.js
@@ -29,7 +29,12 @@ function translate(number, withoutSuffix, key) {
export default moment.defineLocale('pl', {
months : function (momentToFormat, format) {
- if (/D MMMM/.test(format)) {
+ 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.
+ return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
+ } else if (/D MMMM/.test(format)) {
return monthsSubjective[momentToFormat.month()];
} else {
return monthsNominative[momentToFormat.month()];
@@ -88,4 +93,3 @@ export default moment.defineLocale('pl', {
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-