UNPKG

owltech

Version:
41 lines (37 loc) 1.72 kB
/** * @preserve date-and-time.js locale configuration * @preserve Polish (pl) * @preserve It is using moment.js locale configuration as a reference. */ (function (global) { 'use strict'; var locale = function (date) { date.setLocales('pl', { MMMM: { nominative: ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'], subjective: ['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia'] }, MMM: ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'], dddd: ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'], ddd: ['nie', 'pon', 'wt', 'śr', 'czw', 'pt', 'sb'], dd: ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'], formatter: { MMMM: function (d, formatString) { return this.MMMM[/D MMMM/.test(formatString) ? 'subjective' : 'nominative'][d.getMonth()]; } }, parser: { MMMM: function (str, formatString) { return this.parser.find(this.MMMM[/D MMMM/.test(formatString) ? 'subjective' : 'nominative'], str); } } }); }; if (typeof module === 'object' && typeof module.exports === 'object') { locale(require('../date-and-time')); } else if (typeof define === 'function' && define.amd) { define(['date-and-time'], locale); } else { locale(global.date); } }(this));