From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- resources/lib/moment/locale/af.js | 4 +- resources/lib/moment/locale/ar-ma.js | 3 +- resources/lib/moment/locale/ar-sa.js | 5 +- resources/lib/moment/locale/ar.js | 5 +- resources/lib/moment/locale/az.js | 4 +- resources/lib/moment/locale/be.js | 4 +- resources/lib/moment/locale/bg.js | 4 +- resources/lib/moment/locale/bn.js | 3 +- resources/lib/moment/locale/bo.js | 3 +- resources/lib/moment/locale/br.js | 4 +- resources/lib/moment/locale/bs.js | 8 +- resources/lib/moment/locale/ca.js | 15 +++- resources/lib/moment/locale/cs.js | 6 +- resources/lib/moment/locale/cv.js | 4 +- resources/lib/moment/locale/cy.js | 4 +- resources/lib/moment/locale/da.js | 4 +- resources/lib/moment/locale/de-at.js | 16 ++-- resources/lib/moment/locale/de.js | 16 ++-- resources/lib/moment/locale/el.js | 10 +-- resources/lib/moment/locale/en-au.js | 4 +- resources/lib/moment/locale/en-ca.js | 4 +- resources/lib/moment/locale/en-gb.js | 4 +- resources/lib/moment/locale/eo.js | 4 +- resources/lib/moment/locale/es.js | 4 +- resources/lib/moment/locale/et.js | 4 +- resources/lib/moment/locale/eu.js | 4 +- resources/lib/moment/locale/fa.js | 4 +- resources/lib/moment/locale/fi.js | 4 +- resources/lib/moment/locale/fo.js | 4 +- resources/lib/moment/locale/fr-ca.js | 4 +- resources/lib/moment/locale/fr.js | 4 +- resources/lib/moment/locale/gl.js | 4 +- resources/lib/moment/locale/he.js | 3 +- resources/lib/moment/locale/hi.js | 3 +- resources/lib/moment/locale/hr.js | 4 +- resources/lib/moment/locale/hu.js | 4 +- resources/lib/moment/locale/hy-am.js | 4 +- resources/lib/moment/locale/id.js | 3 +- resources/lib/moment/locale/is.js | 4 +- resources/lib/moment/locale/it.js | 13 ++- resources/lib/moment/locale/ja.js | 3 +- resources/lib/moment/locale/ka.js | 4 +- resources/lib/moment/locale/km.js | 3 +- resources/lib/moment/locale/ko.js | 4 +- resources/lib/moment/locale/lb.js | 4 +- resources/lib/moment/locale/lt.js | 4 +- resources/lib/moment/locale/lv.js | 4 +- resources/lib/moment/locale/mk.js | 4 +- resources/lib/moment/locale/ml.js | 3 +- resources/lib/moment/locale/mr.js | 3 +- resources/lib/moment/locale/ms-my.js | 3 +- resources/lib/moment/locale/my.js | 3 +- resources/lib/moment/locale/nb.js | 4 +- resources/lib/moment/locale/ne.js | 3 +- resources/lib/moment/locale/nl.js | 4 +- resources/lib/moment/locale/nn.js | 4 +- resources/lib/moment/locale/pl.js | 4 +- resources/lib/moment/locale/pt-br.js | 4 +- resources/lib/moment/locale/pt.js | 4 +- resources/lib/moment/locale/ro.js | 3 +- resources/lib/moment/locale/ru.js | 40 +++++---- resources/lib/moment/locale/sk.js | 4 +- resources/lib/moment/locale/sl.js | 4 +- resources/lib/moment/locale/sq.js | 4 +- resources/lib/moment/locale/sr-cyrl.js | 4 +- resources/lib/moment/locale/sr.js | 4 +- resources/lib/moment/locale/sv.js | 4 +- resources/lib/moment/locale/ta.js | 4 +- resources/lib/moment/locale/th.js | 3 +- resources/lib/moment/locale/tl-ph.js | 4 +- resources/lib/moment/locale/tr.js | 4 +- resources/lib/moment/locale/tzm-latn.js | 3 +- resources/lib/moment/locale/tzm.js | 3 +- resources/lib/moment/locale/uk.js | 4 +- resources/lib/moment/locale/uz.js | 3 +- resources/lib/moment/locale/vi.js | 4 +- resources/lib/moment/locale/zh-cn.js | 4 +- resources/lib/moment/locale/zh-tw.js | 4 +- resources/lib/moment/moment.js | 148 ++++++++++++++++++++++++-------- 79 files changed, 387 insertions(+), 149 deletions(-) (limited to 'resources/lib/moment') diff --git a/resources/lib/moment/locale/af.js b/resources/lib/moment/locale/af.js index 1b8c5207..2fb7adff 100644 --- a/resources/lib/moment/locale/af.js +++ b/resources/lib/moment/locale/af.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('af', { @@ -26,6 +26,7 @@ }, longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -54,6 +55,7 @@ y : '\'n jaar', yy : '%d jaar' }, + ordinalParse: /\d{1,2}(ste|de)/, ordinal : function (number) { return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter }, diff --git a/resources/lib/moment/locale/ar-ma.js b/resources/lib/moment/locale/ar-ma.js index 5b2095a8..7add1722 100644 --- a/resources/lib/moment/locale/ar-ma.js +++ b/resources/lib/moment/locale/ar-ma.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('ar-ma', { @@ -20,6 +20,7 @@ weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', diff --git a/resources/lib/moment/locale/ar-sa.js b/resources/lib/moment/locale/ar-sa.js index f7867eac..ea7e2f6b 100644 --- a/resources/lib/moment/locale/ar-sa.js +++ b/resources/lib/moment/locale/ar-sa.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -43,6 +43,7 @@ weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -79,7 +80,7 @@ yy : '%d سنوات' }, preparse: function (string) { - return string.replace(/[۰-۹]/g, function (match) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { return numberMap[match]; }).replace(/،/g, ','); }, diff --git a/resources/lib/moment/locale/ar.js b/resources/lib/moment/locale/ar.js index 1791a6b3..d6450087 100644 --- a/resources/lib/moment/locale/ar.js +++ b/resources/lib/moment/locale/ar.js @@ -10,7 +10,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -76,6 +76,7 @@ weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -112,7 +113,7 @@ yy : pluralize('y') }, preparse: function (string) { - return string.replace(/[۰-۹]/g, function (match) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { return numberMap[match]; }).replace(/،/g, ','); }, diff --git a/resources/lib/moment/locale/az.js b/resources/lib/moment/locale/az.js index e82f6e11..d4d14342 100644 --- a/resources/lib/moment/locale/az.js +++ b/resources/lib/moment/locale/az.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var suffixes = { @@ -44,6 +44,7 @@ weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -83,6 +84,7 @@ return 'axşam'; } }, + ordinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, ordinal : function (number) { if (number === 0) { // special case for zero return number + '-ıncı'; diff --git a/resources/lib/moment/locale/be.js b/resources/lib/moment/locale/be.js index fe3186a1..68a6f37c 100644 --- a/resources/lib/moment/locale/be.js +++ b/resources/lib/moment/locale/be.js @@ -10,7 +10,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function plural(word, num) { @@ -71,6 +71,7 @@ weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY г.', LLL : 'D MMMM YYYY г., LT', @@ -127,6 +128,7 @@ } }, + ordinalParse: /\d{1,2}-(і|ы|га)/, ordinal: function (number, period) { switch (period) { case 'M': diff --git a/resources/lib/moment/locale/bg.js b/resources/lib/moment/locale/bg.js index 41b1e3af..540e17b5 100644 --- a/resources/lib/moment/locale/bg.js +++ b/resources/lib/moment/locale/bg.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('bg', { @@ -19,6 +19,7 @@ weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'D.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -59,6 +60,7 @@ y : 'година', yy : '%d години' }, + ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, ordinal : function (number) { var lastDigit = number % 10, last2Digits = number % 100; diff --git a/resources/lib/moment/locale/bn.js b/resources/lib/moment/locale/bn.js index 7e8ccfd5..e9549d99 100644 --- a/resources/lib/moment/locale/bn.js +++ b/resources/lib/moment/locale/bn.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -44,6 +44,7 @@ weekdaysMin : 'রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি'.split('_'), longDateFormat : { LT : 'A h:mm সময়', + LTS : 'A h:mm:ss সময়', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, LT', diff --git a/resources/lib/moment/locale/bo.js b/resources/lib/moment/locale/bo.js index 0d44e47f..cece8d13 100644 --- a/resources/lib/moment/locale/bo.js +++ b/resources/lib/moment/locale/bo.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -44,6 +44,7 @@ weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), longDateFormat : { LT : 'A h:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, LT', diff --git a/resources/lib/moment/locale/br.js b/resources/lib/moment/locale/br.js index a4f1491d..1f8dd614 100644 --- a/resources/lib/moment/locale/br.js +++ b/resources/lib/moment/locale/br.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function relativeTimeWithMutation(number, withoutSuffix, key) { @@ -67,6 +67,7 @@ weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), longDateFormat : { LT : 'h[e]mm A', + LTS : 'h[e]mm:ss A', L : 'DD/MM/YYYY', LL : 'D [a viz] MMMM YYYY', LLL : 'D [a viz] MMMM YYYY LT', @@ -95,6 +96,7 @@ y : 'ur bloaz', yy : specialMutationForYears }, + ordinalParse: /\d{1,2}(añ|vet)/, ordinal : function (number) { var output = (number === 1) ? 'añ' : 'vet'; return number + output; diff --git a/resources/lib/moment/locale/bs.js b/resources/lib/moment/locale/bs.js index b9a58516..c59f46ba 100644 --- a/resources/lib/moment/locale/bs.js +++ b/resources/lib/moment/locale/bs.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function translate(number, withoutSuffix, key) { @@ -66,13 +66,14 @@ } return moment.defineLocale('bs', { - months : 'januar_februar_mart_april_maj_juni_juli_avgust_septembar_oktobar_novembar_decembar'.split('_'), - monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), + months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD. MM. YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', @@ -129,6 +130,7 @@ y : 'godinu', yy : translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/ca.js b/resources/lib/moment/locale/ca.js index fd41ff54..4f0d3fe0 100644 --- a/resources/lib/moment/locale/ca.js +++ b/resources/lib/moment/locale/ca.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('ca', { @@ -19,6 +19,7 @@ weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -57,7 +58,17 @@ y : 'un any', yy : '%d anys' }, - ordinal : '%dº', + ordinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal : function (number, period) { + var output = (number === 1) ? 'r' : + (number === 2) ? 'n' : + (number === 3) ? 'r' : + (number === 4) ? 't' : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, 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. diff --git a/resources/lib/moment/locale/cs.js b/resources/lib/moment/locale/cs.js index 87dec552..b61658dc 100644 --- a/resources/lib/moment/locale/cs.js +++ b/resources/lib/moment/locale/cs.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), @@ -87,7 +87,8 @@ weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'), longDateFormat : { LT: 'H:mm', - L : 'DD. MM. YYYY', + LTS : 'LT:ss', + L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', LLLL : 'dddd D. MMMM YYYY LT' @@ -146,6 +147,7 @@ y : translate, yy : translate }, + ordinalParse : /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/cv.js b/resources/lib/moment/locale/cv.js index 138b6c15..ea8e314d 100644 --- a/resources/lib/moment/locale/cv.js +++ b/resources/lib/moment/locale/cv.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('cv', { @@ -19,6 +19,7 @@ weekdaysMin : 'вр_тн_ыт_юн_кç_эр_шм'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD-MM-YYYY', LL : 'YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]', LLL : 'YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT', @@ -50,6 +51,7 @@ y : 'пĕр çул', yy : '%d çул' }, + ordinalParse: /\d{1,2}-мĕш/, ordinal : '%d-мĕш', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/cy.js b/resources/lib/moment/locale/cy.js index 65fb356b..72b2f91d 100644 --- a/resources/lib/moment/locale/cy.js +++ b/resources/lib/moment/locale/cy.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('cy', { @@ -20,6 +20,7 @@ // time formats are the same as en-gb longDateFormat: { LT: 'HH:mm', + LTS : 'LT:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY LT', @@ -48,6 +49,7 @@ y: 'blwyddyn', yy: '%d flynedd' }, + ordinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh ordinal: function (number) { var b = number, diff --git a/resources/lib/moment/locale/da.js b/resources/lib/moment/locale/da.js index 5e9ef96d..686ce009 100644 --- a/resources/lib/moment/locale/da.js +++ b/resources/lib/moment/locale/da.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('da', { @@ -19,6 +19,7 @@ weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', @@ -47,6 +48,7 @@ y : 'et år', yy : '%d år' }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/de-at.js b/resources/lib/moment/locale/de-at.js index ff715f89..c9826382 100644 --- a/resources/lib/moment/locale/de-at.js +++ b/resources/lib/moment/locale/de-at.js @@ -10,7 +10,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function processRelativeTime(number, withoutSuffix, key, isFuture) { @@ -34,19 +34,20 @@ weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), longDateFormat : { - LT: 'HH:mm [Uhr]', + LT: 'HH:mm', + LTS: 'HH:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', LLLL : 'dddd, D. MMMM YYYY LT' }, calendar : { - sameDay: '[Heute um] LT', + sameDay: '[Heute um] LT [Uhr]', sameElse: 'L', - nextDay: '[Morgen um] LT', - nextWeek: 'dddd [um] LT', - lastDay: '[Gestern um] LT', - lastWeek: '[letzten] dddd [um] LT' + nextDay: '[Morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[Gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' }, relativeTime : { future : 'in %s', @@ -63,6 +64,7 @@ y : processRelativeTime, yy : processRelativeTime }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/de.js b/resources/lib/moment/locale/de.js index 11ab9ace..f6d89a90 100644 --- a/resources/lib/moment/locale/de.js +++ b/resources/lib/moment/locale/de.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function processRelativeTime(number, withoutSuffix, key, isFuture) { @@ -33,19 +33,20 @@ weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), longDateFormat : { - LT: 'HH:mm [Uhr]', + LT: 'HH:mm', + LTS: 'HH:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', LLLL : 'dddd, D. MMMM YYYY LT' }, calendar : { - sameDay: '[Heute um] LT', + sameDay: '[Heute um] LT [Uhr]', sameElse: 'L', - nextDay: '[Morgen um] LT', - nextWeek: 'dddd [um] LT', - lastDay: '[Gestern um] LT', - lastWeek: '[letzten] dddd [um] LT' + nextDay: '[Morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[Gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]' }, relativeTime : { future : 'in %s', @@ -62,6 +63,7 @@ y : processRelativeTime, yy : processRelativeTime }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/el.js b/resources/lib/moment/locale/el.js index eb8eb1a9..6dc769e2 100644 --- a/resources/lib/moment/locale/el.js +++ b/resources/lib/moment/locale/el.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('el', { @@ -38,6 +38,7 @@ meridiemParse : /[ΠΜ]\.?Μ?\.?/i, longDateFormat : { LT : 'h:mm A', + LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -71,7 +72,7 @@ relativeTime : { future : 'σε %s', past : '%s πριν', - s : 'δευτερόλεπτα', + s : 'λίγα δευτερόλεπτα', m : 'ένα λεπτό', mm : '%d λεπτά', h : 'μία ώρα', @@ -83,9 +84,8 @@ y : 'ένας χρόνος', yy : '%d χρόνια' }, - ordinal : function (number) { - return number + 'η'; - }, + ordinalParse: /\d{1,2}η/, + ordinal: '%dη', week : { dow : 1, // Monday is the first day of the week. doy : 4 // The week that contains Jan 4st is the first week of the year. diff --git a/resources/lib/moment/locale/en-au.js b/resources/lib/moment/locale/en-au.js index 75ad34a1..a382b0ae 100644 --- a/resources/lib/moment/locale/en-au.js +++ b/resources/lib/moment/locale/en-au.js @@ -7,7 +7,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('en-au', { @@ -18,6 +18,7 @@ weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat : { LT : 'h:mm A', + LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -46,6 +47,7 @@ y : 'a year', yy : '%d years' }, + ordinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal : function (number) { var b = number % 10, output = (~~(number % 100 / 10) === 1) ? 'th' : diff --git a/resources/lib/moment/locale/en-ca.js b/resources/lib/moment/locale/en-ca.js index 077dc8b5..2dec8a61 100644 --- a/resources/lib/moment/locale/en-ca.js +++ b/resources/lib/moment/locale/en-ca.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('en-ca', { @@ -19,6 +19,7 @@ weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat : { LT : 'h:mm A', + LTS : 'h:mm:ss A', L : 'YYYY-MM-DD', LL : 'D MMMM, YYYY', LLL : 'D MMMM, YYYY LT', @@ -47,6 +48,7 @@ y : 'a year', yy : '%d years' }, + ordinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal : function (number) { var b = number % 10, output = (~~(number % 100 / 10) === 1) ? 'th' : diff --git a/resources/lib/moment/locale/en-gb.js b/resources/lib/moment/locale/en-gb.js index 4491d4a1..4ea2b29e 100644 --- a/resources/lib/moment/locale/en-gb.js +++ b/resources/lib/moment/locale/en-gb.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('en-gb', { @@ -19,6 +19,7 @@ weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -47,6 +48,7 @@ y : 'a year', yy : '%d years' }, + ordinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal : function (number) { var b = number % 10, output = (~~(number % 100 / 10) === 1) ? 'th' : diff --git a/resources/lib/moment/locale/eo.js b/resources/lib/moment/locale/eo.js index 735ed8ea..6a3d097b 100644 --- a/resources/lib/moment/locale/eo.js +++ b/resources/lib/moment/locale/eo.js @@ -10,7 +10,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('eo', { @@ -21,6 +21,7 @@ weekdaysMin : 'Di_Lu_Ma_Me_Ĵa_Ve_Sa'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'YYYY-MM-DD', LL : 'D[-an de] MMMM, YYYY', LLL : 'D[-an de] MMMM, YYYY LT', @@ -56,6 +57,7 @@ y : 'jaro', yy : '%d jaroj' }, + ordinalParse: /\d{1,2}a/, ordinal : '%da', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/es.js b/resources/lib/moment/locale/es.js index 04b83a80..b6e30b10 100644 --- a/resources/lib/moment/locale/es.js +++ b/resources/lib/moment/locale/es.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), @@ -28,6 +28,7 @@ weekdaysMin : 'Do_Lu_Ma_Mi_Ju_Vi_Sá'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D [de] MMMM [de] YYYY', LLL : 'D [de] MMMM [de] YYYY LT', @@ -66,6 +67,7 @@ y : 'un año', yy : '%d años' }, + ordinalParse : /\d{1,2}º/, ordinal : '%dº', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/et.js b/resources/lib/moment/locale/et.js index 242ee169..7dbcee72 100644 --- a/resources/lib/moment/locale/et.js +++ b/resources/lib/moment/locale/et.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function processRelativeTime(number, withoutSuffix, key, isFuture) { @@ -39,6 +39,7 @@ weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', @@ -67,6 +68,7 @@ y : processRelativeTime, yy : processRelativeTime }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/eu.js b/resources/lib/moment/locale/eu.js index 8fb89b49..c455c466 100644 --- a/resources/lib/moment/locale/eu.js +++ b/resources/lib/moment/locale/eu.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('eu', { @@ -19,6 +19,7 @@ weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'YYYY-MM-DD', LL : 'YYYY[ko] MMMM[ren] D[a]', LLL : 'YYYY[ko] MMMM[ren] D[a] LT', @@ -51,6 +52,7 @@ y : 'urte bat', yy : '%d urte' }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/fa.js b/resources/lib/moment/locale/fa.js index b1151bdd..ad2087a2 100644 --- a/resources/lib/moment/locale/fa.js +++ b/resources/lib/moment/locale/fa.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -43,6 +43,7 @@ weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -88,6 +89,7 @@ return symbolMap[match]; }).replace(/,/g, '،'); }, + ordinalParse: /\d{1,2}م/, ordinal : '%dم', week : { dow : 6, // Saturday is the first day of the week. diff --git a/resources/lib/moment/locale/fi.js b/resources/lib/moment/locale/fi.js index 1fedcaba..f884c3ef 100644 --- a/resources/lib/moment/locale/fi.js +++ b/resources/lib/moment/locale/fi.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), @@ -64,6 +64,7 @@ weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), longDateFormat : { LT : 'HH.mm', + LTS : 'HH.mm.ss', L : 'DD.MM.YYYY', LL : 'Do MMMM[ta] YYYY', LLL : 'Do MMMM[ta] YYYY, [klo] LT', @@ -96,6 +97,7 @@ y : translate, yy : translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/fo.js b/resources/lib/moment/locale/fo.js index a27f9da6..6b940e8e 100644 --- a/resources/lib/moment/locale/fo.js +++ b/resources/lib/moment/locale/fo.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('fo', { @@ -19,6 +19,7 @@ weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -47,6 +48,7 @@ y : 'eitt ár', yy : '%d ár' }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/fr-ca.js b/resources/lib/moment/locale/fr-ca.js index c0f1bdc6..6cac1b84 100644 --- a/resources/lib/moment/locale/fr-ca.js +++ b/resources/lib/moment/locale/fr-ca.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('fr-ca', { @@ -19,6 +19,7 @@ weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'YYYY-MM-DD', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -47,6 +48,7 @@ y : 'un an', yy : '%d ans' }, + ordinalParse: /\d{1,2}(er|)/, ordinal : function (number) { return number + (number === 1 ? 'er' : ''); } diff --git a/resources/lib/moment/locale/fr.js b/resources/lib/moment/locale/fr.js index f217ff1d..4a7cbcc5 100644 --- a/resources/lib/moment/locale/fr.js +++ b/resources/lib/moment/locale/fr.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('fr', { @@ -19,6 +19,7 @@ weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -47,6 +48,7 @@ y : 'un an', yy : '%d ans' }, + ordinalParse: /\d{1,2}(er|)/, ordinal : function (number) { return number + (number === 1 ? 'er' : ''); }, diff --git a/resources/lib/moment/locale/gl.js b/resources/lib/moment/locale/gl.js index ac638629..5ff9e3fe 100644 --- a/resources/lib/moment/locale/gl.js +++ b/resources/lib/moment/locale/gl.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('gl', { @@ -19,6 +19,7 @@ weekdaysMin : 'Do_Lu_Ma_Mé_Xo_Ve_Sá'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -62,6 +63,7 @@ y : 'un ano', yy : '%d anos' }, + ordinalParse : /\d{1,2}º/, ordinal : '%dº', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/he.js b/resources/lib/moment/locale/he.js index 06f954f4..9f9f4705 100644 --- a/resources/lib/moment/locale/he.js +++ b/resources/lib/moment/locale/he.js @@ -10,7 +10,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('he', { @@ -21,6 +21,7 @@ weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D [ב]MMMM YYYY', LLL : 'D [ב]MMMM YYYY LT', diff --git a/resources/lib/moment/locale/hi.js b/resources/lib/moment/locale/hi.js index 4e64560a..73deba5b 100644 --- a/resources/lib/moment/locale/hi.js +++ b/resources/lib/moment/locale/hi.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -44,6 +44,7 @@ weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), longDateFormat : { LT : 'A h:mm बजे', + LTS : 'A h:mm:ss बजे', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, LT', diff --git a/resources/lib/moment/locale/hr.js b/resources/lib/moment/locale/hr.js index 9e3f6fa3..65264dc2 100644 --- a/resources/lib/moment/locale/hr.js +++ b/resources/lib/moment/locale/hr.js @@ -10,7 +10,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function translate(number, withoutSuffix, key) { @@ -74,6 +74,7 @@ weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD. MM. YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', @@ -130,6 +131,7 @@ y : 'godinu', yy : translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/hu.js b/resources/lib/moment/locale/hu.js index 73fdb83f..7eccd1d9 100644 --- a/resources/lib/moment/locale/hu.js +++ b/resources/lib/moment/locale/hu.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); @@ -57,6 +57,7 @@ weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'YYYY.MM.DD.', LL : 'YYYY. MMMM D.', LLL : 'YYYY. MMMM D., LT', @@ -96,6 +97,7 @@ y : translate, yy : translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/hy-am.js b/resources/lib/moment/locale/hy-am.js index affcd7e8..053a845e 100644 --- a/resources/lib/moment/locale/hy-am.js +++ b/resources/lib/moment/locale/hy-am.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function monthsCaseReplace(m, format) { @@ -44,6 +44,7 @@ weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY թ.', LLL : 'D MMMM YYYY թ., LT', @@ -89,6 +90,7 @@ } }, + ordinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, ordinal: function (number, period) { switch (period) { case 'DDD': diff --git a/resources/lib/moment/locale/id.js b/resources/lib/moment/locale/id.js index 143426aa..36a841a6 100644 --- a/resources/lib/moment/locale/id.js +++ b/resources/lib/moment/locale/id.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('id', { @@ -20,6 +20,7 @@ weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), longDateFormat : { LT : 'HH.mm', + LTS : 'LT.ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY [pukul] LT', diff --git a/resources/lib/moment/locale/is.js b/resources/lib/moment/locale/is.js index 479f82d9..21888aa2 100644 --- a/resources/lib/moment/locale/is.js +++ b/resources/lib/moment/locale/is.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function plural(n) { @@ -87,6 +87,7 @@ weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY [kl.] LT', @@ -115,6 +116,7 @@ y : translate, yy : translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/it.js b/resources/lib/moment/locale/it.js index 66953909..9d14714f 100644 --- a/resources/lib/moment/locale/it.js +++ b/resources/lib/moment/locale/it.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('it', { @@ -20,6 +20,7 @@ weekdaysMin : 'D_L_Ma_Me_G_V_S'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -30,7 +31,14 @@ nextDay: '[Domani alle] LT', nextWeek: 'dddd [alle] LT', lastDay: '[Ieri alle] LT', - lastWeek: '[lo scorso] dddd [alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, sameElse: 'L' }, relativeTime : { @@ -50,6 +58,7 @@ y : 'un anno', yy : '%d anni' }, + ordinalParse : /\d{1,2}º/, ordinal: '%dº', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/ja.js b/resources/lib/moment/locale/ja.js index f14fa4e6..3f55bcfd 100644 --- a/resources/lib/moment/locale/ja.js +++ b/resources/lib/moment/locale/ja.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('ja', { @@ -19,6 +19,7 @@ weekdaysMin : '日_月_火_水_木_金_土'.split('_'), longDateFormat : { LT : 'Ah時m分', + LTS : 'LTs秒', L : 'YYYY/MM/DD', LL : 'YYYY年M月D日', LLL : 'YYYY年M月D日LT', diff --git a/resources/lib/moment/locale/ka.js b/resources/lib/moment/locale/ka.js index 73eb9c75..b56e18cb 100644 --- a/resources/lib/moment/locale/ka.js +++ b/resources/lib/moment/locale/ka.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function monthsCaseReplace(m, format) { @@ -45,6 +45,7 @@ weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), longDateFormat : { LT : 'h:mm A', + LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -84,6 +85,7 @@ y : 'წელი', yy : '%d წელი' }, + ordinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, ordinal : function (number) { if (number === 0) { return number; diff --git a/resources/lib/moment/locale/km.js b/resources/lib/moment/locale/km.js index 9ba4888b..8d7b9b85 100644 --- a/resources/lib/moment/locale/km.js +++ b/resources/lib/moment/locale/km.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('km', { @@ -19,6 +19,7 @@ weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), longDateFormat: { LT: 'HH:mm', + LTS : 'LT:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY LT', diff --git a/resources/lib/moment/locale/ko.js b/resources/lib/moment/locale/ko.js index 57017f5e..956345bd 100644 --- a/resources/lib/moment/locale/ko.js +++ b/resources/lib/moment/locale/ko.js @@ -11,7 +11,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('ko', { @@ -22,6 +22,7 @@ weekdaysMin : '일_월_화_수_목_금_토'.split('_'), longDateFormat : { LT : 'A h시 m분', + LTS : 'A h시 m분 s초', L : 'YYYY.MM.DD', LL : 'YYYY년 MMMM D일', LLL : 'YYYY년 MMMM D일 LT', @@ -54,6 +55,7 @@ y : '일년', yy : '%d년' }, + ordinalParse : /\d{1,2}일/, ordinal : '%d일', meridiemParse : /(오전|오후)/, isPM : function (token) { diff --git a/resources/lib/moment/locale/lb.js b/resources/lib/moment/locale/lb.js index 14fab973..2e84dab3 100644 --- a/resources/lib/moment/locale/lb.js +++ b/resources/lib/moment/locale/lb.js @@ -12,7 +12,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function processRelativeTime(number, withoutSuffix, key, isFuture) { @@ -91,6 +91,7 @@ weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), longDateFormat: { LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY LT', @@ -128,6 +129,7 @@ y : processRelativeTime, yy : '%d Joer' }, + ordinalParse: /\d{1,2}\./, ordinal: '%d.', week: { dow: 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/lt.js b/resources/lib/moment/locale/lt.js index 013f8f1e..2d87e04c 100644 --- a/resources/lib/moment/locale/lt.js +++ b/resources/lib/moment/locale/lt.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var units = { @@ -75,6 +75,7 @@ weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'YYYY-MM-DD', LL : 'YYYY [m.] MMMM D [d.]', LLL : 'YYYY [m.] MMMM D [d.], LT [val.]', @@ -107,6 +108,7 @@ y : translateSingular, yy : translate }, + ordinalParse: /\d{1,2}-oji/, ordinal : function (number) { return number + '-oji'; }, diff --git a/resources/lib/moment/locale/lv.js b/resources/lib/moment/locale/lv.js index 7e1892e3..47a0708c 100644 --- a/resources/lib/moment/locale/lv.js +++ b/resources/lib/moment/locale/lv.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var units = { @@ -40,6 +40,7 @@ weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'YYYY. [gada] D. MMMM', LLL : 'YYYY. [gada] D. MMMM, LT', @@ -68,6 +69,7 @@ y : 'gadu', yy : relativeTimeWithPlural }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/mk.js b/resources/lib/moment/locale/mk.js index 94c7fc1a..de366319 100644 --- a/resources/lib/moment/locale/mk.js +++ b/resources/lib/moment/locale/mk.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('mk', { @@ -19,6 +19,7 @@ weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'D.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -59,6 +60,7 @@ y : 'година', yy : '%d години' }, + ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, ordinal : function (number) { var lastDigit = number % 10, last2Digits = number % 100; diff --git a/resources/lib/moment/locale/ml.js b/resources/lib/moment/locale/ml.js index ea4d9490..38509141 100644 --- a/resources/lib/moment/locale/ml.js +++ b/resources/lib/moment/locale/ml.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('ml', { @@ -19,6 +19,7 @@ weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), longDateFormat : { LT : 'A h:mm -നു', + LTS : 'A h:mm:ss -നു', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, LT', diff --git a/resources/lib/moment/locale/mr.js b/resources/lib/moment/locale/mr.js index 141eaf86..45c200e8 100644 --- a/resources/lib/moment/locale/mr.js +++ b/resources/lib/moment/locale/mr.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -44,6 +44,7 @@ weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), longDateFormat : { LT : 'A h:mm वाजता', + LTS : 'A h:mm:ss वाजता', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, LT', diff --git a/resources/lib/moment/locale/ms-my.js b/resources/lib/moment/locale/ms-my.js index 7efcbaaa..09ec280b 100644 --- a/resources/lib/moment/locale/ms-my.js +++ b/resources/lib/moment/locale/ms-my.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('ms-my', { @@ -19,6 +19,7 @@ weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), longDateFormat : { LT : 'HH.mm', + LTS : 'LT.ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY [pukul] LT', diff --git a/resources/lib/moment/locale/my.js b/resources/lib/moment/locale/my.js index 138d1014..31f5c9ea 100644 --- a/resources/lib/moment/locale/my.js +++ b/resources/lib/moment/locale/my.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -42,6 +42,7 @@ weekdaysMin: 'နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), longDateFormat: { LT: 'HH:mm', + LTS: 'HH:mm:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY LT', diff --git a/resources/lib/moment/locale/nb.js b/resources/lib/moment/locale/nb.js index 533659d5..4764b505 100644 --- a/resources/lib/moment/locale/nb.js +++ b/resources/lib/moment/locale/nb.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('nb', { @@ -20,6 +20,7 @@ weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), longDateFormat : { LT : 'H.mm', + LTS : 'LT.ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY [kl.] LT', @@ -48,6 +49,7 @@ y : 'ett år', yy : '%d år' }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/ne.js b/resources/lib/moment/locale/ne.js index 51629ebd..ceb28341 100644 --- a/resources/lib/moment/locale/ne.js +++ b/resources/lib/moment/locale/ne.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var symbolMap = { @@ -44,6 +44,7 @@ weekdaysMin : 'आइ._सो._मङ्_बु._बि._शु._श.'.split('_'), longDateFormat : { LT : 'Aको h:mm बजे', + LTS : 'Aको h:mm:ss बजे', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, LT', diff --git a/resources/lib/moment/locale/nl.js b/resources/lib/moment/locale/nl.js index 213beeb8..9f4fdfe7 100644 --- a/resources/lib/moment/locale/nl.js +++ b/resources/lib/moment/locale/nl.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), @@ -28,6 +28,7 @@ weekdaysMin : 'Zo_Ma_Di_Wo_Do_Vr_Za'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD-MM-YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -56,6 +57,7 @@ y : 'één jaar', yy : '%d jaar' }, + ordinalParse: /\d{1,2}(ste|de)/, ordinal : function (number) { return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); }, diff --git a/resources/lib/moment/locale/nn.js b/resources/lib/moment/locale/nn.js index c5b65055..d7a82380 100644 --- a/resources/lib/moment/locale/nn.js +++ b/resources/lib/moment/locale/nn.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('nn', { @@ -19,6 +19,7 @@ weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -47,6 +48,7 @@ y : 'eit år', yy : '%d år' }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/pl.js b/resources/lib/moment/locale/pl.js index 63a62f13..418ca817 100644 --- a/resources/lib/moment/locale/pl.js +++ b/resources/lib/moment/locale/pl.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'), @@ -50,6 +50,7 @@ weekdaysMin : 'N_Pn_Wt_Śr_Cz_Pt_So'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -89,6 +90,7 @@ y : 'rok', yy : translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/pt-br.js b/resources/lib/moment/locale/pt-br.js index 44eedaf0..813c2de4 100644 --- a/resources/lib/moment/locale/pt-br.js +++ b/resources/lib/moment/locale/pt-br.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('pt-br', { @@ -19,6 +19,7 @@ weekdaysMin : 'dom_2ª_3ª_4ª_5ª_6ª_sáb'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D [de] MMMM [de] YYYY', LLL : 'D [de] MMMM [de] YYYY [às] LT', @@ -51,6 +52,7 @@ y : 'um ano', yy : '%d anos' }, + ordinalParse: /\d{1,2}º/, ordinal : '%dº' }); })); diff --git a/resources/lib/moment/locale/pt.js b/resources/lib/moment/locale/pt.js index aced692e..4afd5643 100644 --- a/resources/lib/moment/locale/pt.js +++ b/resources/lib/moment/locale/pt.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('pt', { @@ -19,6 +19,7 @@ weekdaysMin : 'dom_2ª_3ª_4ª_5ª_6ª_sáb'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D [de] MMMM [de] YYYY', LLL : 'D [de] MMMM [de] YYYY LT', @@ -51,6 +52,7 @@ y : 'um ano', yy : '%d anos' }, + ordinalParse: /\d{1,2}º/, ordinal : '%dº', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/ro.js b/resources/lib/moment/locale/ro.js index dc34d3c3..fcc7d07d 100644 --- a/resources/lib/moment/locale/ro.js +++ b/resources/lib/moment/locale/ro.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function relativeTimeWithPlural(number, withoutSuffix, key) { @@ -36,6 +36,7 @@ weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY H:mm', diff --git a/resources/lib/moment/locale/ru.js b/resources/lib/moment/locale/ru.js index 2f15233b..5adfa9ac 100644 --- a/resources/lib/moment/locale/ru.js +++ b/resources/lib/moment/locale/ru.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function plural(word, num) { @@ -48,7 +48,7 @@ function monthsShortCaseReplace(m, format) { var monthsShort = { - 'nominative': 'янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), + 'nominative': 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), 'accusative': 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_') }, @@ -65,7 +65,7 @@ 'accusative': 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_') }, - nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ? + nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/).test(format) ? 'accusative' : 'nominative'; @@ -81,6 +81,7 @@ monthsParse : [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[й|я]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i], longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY г.', LLL : 'D MMMM YYYY г., LT', @@ -93,18 +94,26 @@ nextWeek: function () { return this.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT'; }, - lastWeek: function () { - switch (this.day()) { - case 0: - return '[В прошлое] dddd [в] LT'; - case 1: - case 2: - case 4: - return '[В прошлый] dddd [в] LT'; - case 3: - case 5: - case 6: - return '[В прошлую] dddd [в] LT'; + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd [в] LT'; + } else { + return '[В] dddd [в] LT'; + } } }, sameElse: 'L' @@ -142,6 +151,7 @@ } }, + ordinalParse: /\d{1,2}-(й|го|я)/, ordinal: function (number, period) { switch (period) { case 'M': diff --git a/resources/lib/moment/locale/sk.js b/resources/lib/moment/locale/sk.js index 991afebb..f9d74c5d 100644 --- a/resources/lib/moment/locale/sk.js +++ b/resources/lib/moment/locale/sk.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), @@ -88,6 +88,7 @@ weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'), longDateFormat : { LT: 'H:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', @@ -147,6 +148,7 @@ y : translate, yy : translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/sl.js b/resources/lib/moment/locale/sl.js index 2bdbf1cd..232695fa 100644 --- a/resources/lib/moment/locale/sl.js +++ b/resources/lib/moment/locale/sl.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function translate(number, withoutSuffix, key) { @@ -80,6 +80,7 @@ weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'), longDateFormat : { LT : 'H:mm', + LTS : 'LT:ss', L : 'DD. MM. YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY LT', @@ -135,6 +136,7 @@ y : 'eno leto', yy : translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/sq.js b/resources/lib/moment/locale/sq.js index 6ae41787..415495aa 100644 --- a/resources/lib/moment/locale/sq.js +++ b/resources/lib/moment/locale/sq.js @@ -10,7 +10,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('sq', { @@ -24,6 +24,7 @@ }, longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -52,6 +53,7 @@ y : 'një vit', yy : '%d vite' }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/sr-cyrl.js b/resources/lib/moment/locale/sr-cyrl.js index 7278de6e..57619b64 100644 --- a/resources/lib/moment/locale/sr-cyrl.js +++ b/resources/lib/moment/locale/sr-cyrl.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var translator = { @@ -42,6 +42,7 @@ weekdaysMin: ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'], longDateFormat: { LT: 'H:mm', + LTS : 'LT:ss', L: 'DD. MM. YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY LT', @@ -96,6 +97,7 @@ y : 'годину', yy : translator.translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/sr.js b/resources/lib/moment/locale/sr.js index d008282e..6f142843 100644 --- a/resources/lib/moment/locale/sr.js +++ b/resources/lib/moment/locale/sr.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var translator = { @@ -42,6 +42,7 @@ weekdaysMin: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], longDateFormat: { LT: 'H:mm', + LTS : 'LT:ss', L: 'DD. MM. YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY LT', @@ -96,6 +97,7 @@ y : 'godinu', yy : translator.translate }, + ordinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. diff --git a/resources/lib/moment/locale/sv.js b/resources/lib/moment/locale/sv.js index 634b3cfe..6e149580 100644 --- a/resources/lib/moment/locale/sv.js +++ b/resources/lib/moment/locale/sv.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('sv', { @@ -19,6 +19,7 @@ weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'YYYY-MM-DD', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -47,6 +48,7 @@ y : 'ett år', yy : '%d år' }, + ordinalParse: /\d{1,2}(e|a)/, ordinal : function (number) { var b = number % 10, output = (~~(number % 100 / 10) === 1) ? 'e' : diff --git a/resources/lib/moment/locale/ta.js b/resources/lib/moment/locale/ta.js index 53bab0d9..d0356a3e 100644 --- a/resources/lib/moment/locale/ta.js +++ b/resources/lib/moment/locale/ta.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { /*var symbolMap = { @@ -44,6 +44,7 @@ weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, LT', @@ -82,6 +83,7 @@ return symbolMap[match]; }); },*/ + ordinalParse: /\d{1,2}வது/, ordinal : function (number) { return number + 'வது'; }, diff --git a/resources/lib/moment/locale/th.js b/resources/lib/moment/locale/th.js index fc99701d..e3c54229 100644 --- a/resources/lib/moment/locale/th.js +++ b/resources/lib/moment/locale/th.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('th', { @@ -19,6 +19,7 @@ weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), longDateFormat : { LT : 'H นาฬิกา m นาที', + LTS : 'LT s วินาที', L : 'YYYY/MM/DD', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY เวลา LT', diff --git a/resources/lib/moment/locale/tl-ph.js b/resources/lib/moment/locale/tl-ph.js index c15cc1f0..40dbb075 100644 --- a/resources/lib/moment/locale/tl-ph.js +++ b/resources/lib/moment/locale/tl-ph.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('tl-ph', { @@ -19,6 +19,7 @@ weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'MM/D/YYYY', LL : 'MMMM D, YYYY', LLL : 'MMMM D, YYYY LT', @@ -47,6 +48,7 @@ y : 'isang taon', yy : '%d taon' }, + ordinalParse: /\d{1,2}/, ordinal : function (number) { return number; }, diff --git a/resources/lib/moment/locale/tr.js b/resources/lib/moment/locale/tr.js index 36e8fca1..cd0a7462 100644 --- a/resources/lib/moment/locale/tr.js +++ b/resources/lib/moment/locale/tr.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { var suffixes = { @@ -46,6 +46,7 @@ weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', @@ -74,6 +75,7 @@ y : 'bir yıl', yy : '%d yıl' }, + ordinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/, ordinal : function (number) { if (number === 0) { // special case for zero return number + '\'ıncı'; diff --git a/resources/lib/moment/locale/tzm-latn.js b/resources/lib/moment/locale/tzm-latn.js index 31897725..34592b45 100644 --- a/resources/lib/moment/locale/tzm-latn.js +++ b/resources/lib/moment/locale/tzm-latn.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('tzm-latn', { @@ -19,6 +19,7 @@ weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', diff --git a/resources/lib/moment/locale/tzm.js b/resources/lib/moment/locale/tzm.js index 0a7f3f1e..95915212 100644 --- a/resources/lib/moment/locale/tzm.js +++ b/resources/lib/moment/locale/tzm.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('tzm', { @@ -19,6 +19,7 @@ weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS: 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', diff --git a/resources/lib/moment/locale/uk.js b/resources/lib/moment/locale/uk.js index bc22fff9..3dce4bca 100644 --- a/resources/lib/moment/locale/uk.js +++ b/resources/lib/moment/locale/uk.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function plural(word, num) { @@ -79,6 +79,7 @@ weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY р.', LLL : 'D MMMM YYYY р., LT', @@ -134,6 +135,7 @@ } }, + ordinalParse: /\d{1,2}-(й|го)/, ordinal: function (number, period) { switch (period) { case 'M': diff --git a/resources/lib/moment/locale/uz.js b/resources/lib/moment/locale/uz.js index 62fb89e0..139e4deb 100644 --- a/resources/lib/moment/locale/uz.js +++ b/resources/lib/moment/locale/uz.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('uz', { @@ -19,6 +19,7 @@ weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY LT', diff --git a/resources/lib/moment/locale/vi.js b/resources/lib/moment/locale/vi.js index 20e3ffe2..15ec7dda 100644 --- a/resources/lib/moment/locale/vi.js +++ b/resources/lib/moment/locale/vi.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('vi', { @@ -19,6 +19,7 @@ weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), longDateFormat : { LT : 'HH:mm', + LTS : 'LT:ss', L : 'DD/MM/YYYY', LL : 'D MMMM [năm] YYYY', LLL : 'D MMMM [năm] YYYY LT', @@ -51,6 +52,7 @@ y : 'một năm', yy : '%d năm' }, + ordinalParse: /\d{1,2}/, ordinal : function (number) { return number; }, diff --git a/resources/lib/moment/locale/zh-cn.js b/resources/lib/moment/locale/zh-cn.js index aff26c5e..b8a0bd2e 100644 --- a/resources/lib/moment/locale/zh-cn.js +++ b/resources/lib/moment/locale/zh-cn.js @@ -9,7 +9,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('zh-cn', { @@ -20,6 +20,7 @@ weekdaysMin : '日_一_二_三_四_五_六'.split('_'), longDateFormat : { LT : 'Ah点mm', + LTS : 'Ah点m分s秒', L : 'YYYY-MM-DD', LL : 'YYYY年MMMD日', LLL : 'YYYY年MMMD日LT', @@ -69,6 +70,7 @@ }, sameElse : 'LL' }, + ordinalParse: /\d{1,2}(日|月|周)/, ordinal : function (number, period) { switch (period) { case 'd': diff --git a/resources/lib/moment/locale/zh-tw.js b/resources/lib/moment/locale/zh-tw.js index 71f99a26..b3c4439c 100644 --- a/resources/lib/moment/locale/zh-tw.js +++ b/resources/lib/moment/locale/zh-tw.js @@ -8,7 +8,7 @@ } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { - factory(window.moment); // Browser global + factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { return moment.defineLocale('zh-tw', { @@ -19,6 +19,7 @@ weekdaysMin : '日_一_二_三_四_五_六'.split('_'), longDateFormat : { LT : 'Ah點mm', + LTS : 'Ah點m分s秒', L : 'YYYY年MMMD日', LL : 'YYYY年MMMD日', LLL : 'YYYY年MMMD日LT', @@ -50,6 +51,7 @@ lastWeek : '[上]ddddLT', sameElse : 'L' }, + ordinalParse: /\d{1,2}(日|月|週)/, ordinal : function (number, period) { switch (period) { case 'd' : diff --git a/resources/lib/moment/moment.js b/resources/lib/moment/moment.js index d100a9c4..85e190d4 100644 --- a/resources/lib/moment/moment.js +++ b/resources/lib/moment/moment.js @@ -1,5 +1,5 @@ //! moment.js -//! version : 2.8.3 +//! version : 2.8.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com @@ -10,7 +10,7 @@ ************************************/ var moment, - VERSION = '2.8.3', + VERSION = '2.8.4', // the global-scope this is NOT the global object in Node.js globalScope = typeof global !== 'undefined' ? global : this, oldGlobalMoment, @@ -33,7 +33,7 @@ momentProperties = [], // check for nodeJS - hasModule = (typeof module !== 'undefined' && module.exports), + hasModule = (typeof module !== 'undefined' && module && module.exports), // ASP.NET json date format regex aspNetJsonRegex = /^\/?Date\((\-?\d+)/i, @@ -44,8 +44,8 @@ isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/, // format tokens - formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g, - localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g, + formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g, + localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, // parsing token regexes parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99 @@ -56,8 +56,8 @@ parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic. parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z parseTokenT = /T/i, // T (ISO separator) + parseTokenOffsetMs = /[\+\-]?\d+/, // 1234567890123 parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 - parseTokenOrdinal = /\d{1,2}/, //strict parsing regexes parseTokenOneDigit = /\d/, // 0 - 9 @@ -272,6 +272,9 @@ zz : function () { return this.zoneName(); }, + x : function () { + return this.valueOf(); + }, X : function () { return this.unix(); }, @@ -698,7 +701,10 @@ overflow = m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH : m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE : - m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR : + m._a[HOUR] < 0 || m._a[HOUR] > 24 || + (m._a[HOUR] === 24 && (m._a[MINUTE] !== 0 || + m._a[SECOND] !== 0 || + m._a[MILLISECOND] !== 0)) ? HOUR : m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE : m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND : m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND : @@ -725,7 +731,8 @@ if (m._strict) { m._isValid = m._isValid && m._pf.charsLeftOver === 0 && - m._pf.unusedTokens.length === 0; + m._pf.unusedTokens.length === 0 && + m._pf.bigHour === undefined; } } return m._isValid; @@ -777,8 +784,18 @@ // Return a moment from input, that is local/utc/zone equivalent to model. function makeAs(input, model) { - return model._isUTC ? moment(input).zone(model._offset || 0) : - moment(input).local(); + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = (moment.isMoment(input) || isDate(input) ? + +input : +moment(input)) - (+res); + // Use low-level api, because this fn is low-level api. + res._d.setTime(+res._d + diff); + moment.updateOffset(res, false); + return res; + } else { + return moment(input).local(); + } } /************************************ @@ -798,6 +815,9 @@ this['_' + i] = prop; } } + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _ordinalParseLenient. + this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source); }, _months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), @@ -810,22 +830,32 @@ return this._monthsShort[m.month()]; }, - monthsParse : function (monthName) { + monthsParse : function (monthName, format, strict) { var i, mom, regex; if (!this._monthsParse) { this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; } for (i = 0; i < 12; i++) { // make the regex if we don't have it already - if (!this._monthsParse[i]) { - mom = moment.utc([2000, i]); + mom = moment.utc([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); + } + if (!strict && !this._monthsParse[i]) { regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex - if (this._monthsParse[i].test(monthName)) { + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { return i; } } @@ -868,6 +898,7 @@ }, _longDateFormat : { + LTS : 'h:mm:ss A', LT : 'h:mm A', L : 'MM/DD/YYYY', LL : 'MMMM D, YYYY', @@ -908,9 +939,9 @@ lastWeek : '[Last] dddd [at] LT', sameElse : 'L' }, - calendar : function (key, mom) { + calendar : function (key, mom, now) { var output = this._calendar[key]; - return typeof output === 'function' ? output.apply(mom) : output; + return typeof output === 'function' ? output.apply(mom, [now]) : output; }, _relativeTime : { @@ -945,6 +976,7 @@ return this._ordinal.replace('%d', number); }, _ordinal : '%d', + _ordinalParse : /\d{1,2}/, preparse : function (string) { return string; @@ -1086,6 +1118,8 @@ case 'a': case 'A': return config._locale._meridiemParse; + case 'x': + return parseTokenOffsetMs; case 'X': return parseTokenTimestampMs; case 'Z': @@ -1120,7 +1154,7 @@ case 'E': return parseTokenOneOrTwoDigits; case 'Do': - return parseTokenOrdinal; + return strict ? config._locale._ordinalParse : config._locale._ordinalParseLenient; default : a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i')); return a; @@ -1157,7 +1191,7 @@ break; case 'MMM' : // fall through to MMMM case 'MMMM' : - a = config._locale.monthsParse(input); + a = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. if (a != null) { datePartArray[MONTH] = a; @@ -1174,7 +1208,8 @@ break; case 'Do' : if (input != null) { - datePartArray[DATE] = toInt(parseInt(input, 10)); + datePartArray[DATE] = toInt(parseInt( + input.match(/\d{1,2}/)[0], 10)); } break; // DAY OF YEAR @@ -1199,11 +1234,13 @@ case 'A' : config._isPm = config._locale.isPM(input); break; - // 24 HOUR - case 'H' : // fall through to hh - case 'HH' : // fall through to hh + // HOUR case 'h' : // fall through to hh case 'hh' : + config._pf.bigHour = true; + /* falls through */ + case 'H' : // fall through to HH + case 'HH' : datePartArray[HOUR] = toInt(input); break; // MINUTE @@ -1223,6 +1260,10 @@ case 'SSSS' : datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000); break; + // UNIX OFFSET (MILLISECONDS) + case 'x': + config._d = new Date(toInt(input)); + break; // UNIX TIMESTAMP WITH MS case 'X': config._d = new Date(parseFloat(input) * 1000); @@ -1359,12 +1400,25 @@ config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } + // Check for 24:00:00.000 + if (config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input); // Apply timezone offset from input. The actual zone can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() + config._tzm); } + + if (config._nextDay) { + config._a[HOUR] = 24; + } } function dateFromObject(config) { @@ -1378,7 +1432,7 @@ config._a = [ normalizedInput.year, normalizedInput.month, - normalizedInput.day, + normalizedInput.day || normalizedInput.date, normalizedInput.hour, normalizedInput.minute, normalizedInput.second, @@ -1451,6 +1505,10 @@ config._pf.unusedInput.push(string); } + // clear _12h flag if hour is <= 12 + if (config._pf.bigHour === true && config._a[HOUR] <= 12) { + config._pf.bigHour = undefined; + } // handle am pm if (config._isPm && config._a[HOUR] < 12) { config._a[HOUR] += 12; @@ -1459,7 +1517,6 @@ if (config._isPm === false && config._a[HOUR] === 12) { config._a[HOUR] = 0; } - dateFromConfig(config); checkOverflow(config); } @@ -1719,7 +1776,8 @@ function makeMoment(config) { var input = config._i, - format = config._f; + format = config._f, + res; config._locale = config._locale || moment.localeData(config._l); @@ -1743,7 +1801,14 @@ makeDateFromInput(config); } - return new Moment(config); + res = new Moment(config); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; } moment = function (input, format, locale, strict) { @@ -1775,7 +1840,7 @@ 'release. Please refer to ' + 'https://github.com/moment/moment/issues/1407 for more info.', function (config) { - config._d = new Date(config._i); + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } ); @@ -2087,7 +2152,12 @@ toISOString : function () { var m = moment(this).utc(); if (0 < m.year() && m.year() <= 9999) { - return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); + if ('function' === typeof Date.prototype.toISOString) { + // native implementation is ~50x faster, use it when we can + return this.toDate().toISOString(); + } else { + return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); + } } else { return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } @@ -2206,7 +2276,7 @@ diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; - return this.format(this.localeData().calendar(format, this)); + return this.format(this.localeData().calendar(format, this, moment(now))); }, isLeapYear : function () { @@ -2275,36 +2345,45 @@ endOf: function (units) { units = normalizeUnits(units); + if (units === undefined || units === 'millisecond') { + return this; + } return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); }, isAfter: function (input, units) { + var inputMs; units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); if (units === 'millisecond') { input = moment.isMoment(input) ? input : moment(input); return +this > +input; } else { - return +this.clone().startOf(units) > +moment(input).startOf(units); + inputMs = moment.isMoment(input) ? +input : +moment(input); + return inputMs < +this.clone().startOf(units); } }, isBefore: function (input, units) { + var inputMs; units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); if (units === 'millisecond') { input = moment.isMoment(input) ? input : moment(input); return +this < +input; } else { - return +this.clone().startOf(units) < +moment(input).startOf(units); + inputMs = moment.isMoment(input) ? +input : +moment(input); + return +this.clone().endOf(units) < inputMs; } }, isSame: function (input, units) { + var inputMs; units = normalizeUnits(units || 'millisecond'); if (units === 'millisecond') { input = moment.isMoment(input) ? input : moment(input); return +this === +input; } else { - return +this.clone().startOf(units) === +makeAs(input, this).startOf(units); + inputMs = +moment(input); + return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); } }, @@ -2481,7 +2560,7 @@ }, lang : deprecate( - 'moment().lang() is deprecated. Use moment().localeData() instead.', + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { if (key === undefined) { return this.localeData(); @@ -2702,7 +2781,7 @@ return units === 'month' ? months : months / 12; } else { // handle milliseconds separately because of floating point math errors (issue #1867) - days = this._days + yearsToDays(this._months / 12); + days = this._days + Math.round(yearsToDays(this._months / 12)); switch (units) { case 'week': return days / 7 + this._milliseconds / 6048e5; case 'day': return days + this._milliseconds / 864e5; @@ -2804,6 +2883,7 @@ // Set default locale, other locale will inherit from English. moment.locale('en', { + ordinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal : function (number) { var b = number % 10, output = (toInt(number % 100 / 10) === 1) ? 'th' : -- cgit v1.2.2