diff options
Diffstat (limited to 'www/lib/moment/locale/pl.js')
| -rw-r--r-- | www/lib/moment/locale/pl.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/www/lib/moment/locale/pl.js b/www/lib/moment/locale/pl.js index 1042c3f8..9bbc39c2 100644 --- a/www/lib/moment/locale/pl.js +++ b/www/lib/moment/locale/pl.js @@ -34,7 +34,12 @@ var pl = 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()]; |
