* (T69341) SVG images will no longer be base64-encoded when being embedded
in CSS. This results in slight size increase before gzip compression (due to
percent-encoding), but up to 20% decrease after it.
-* Upgrade jStorage to v0.4.12.
+* Update jStorage to v0.4.12.
* MediaWiki now natively supports page status indicators: icons (or short text
snippets) usually displayed in the top-right corner of the page. They have
been in use on Wikipedia for a long time, implemented using templates and CSS
installed via composer will not be shown in this section as it is assumed
they will add the proper credits to the skins or extensions section.
* Update QUnit from v1.14.0 to v1.16.0.
+* Update Moment.js from v2.8.3 to v2.8.4.
==== External libraries ====
* MediaWiki now requires certain external libraries to be installed. In the past
} 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', {
},
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
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
},
} 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', {
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
} 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 = {
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
yy : '%d سنوات'
},
preparse: function (string) {
- return string.replace(/[۰-۹]/g, function (match) {
+ return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
}).replace(/،/g, ',');
},
} 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 = {
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
yy : pluralize('y')
},
preparse: function (string) {
- return string.replace(/[۰-۹]/g, function (match) {
+ return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
}).replace(/،/g, ',');
},
} 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 = {
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',
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ı';
} 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) {
weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY г.',
LLL : 'D MMMM YYYY г., LT',
}
},
+ ordinalParse: /\d{1,2}-(і|ы|га)/,
ordinal: function (number, period) {
switch (period) {
case 'M':
} 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', {
weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat : {
LT : 'H:mm',
+ LTS : 'LT:ss',
L : 'D.MM.YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
y : 'година',
yy : '%d години'
},
+ ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
ordinal : function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
} 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 = {
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',
} 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 = {
weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
longDateFormat : {
LT : 'A h:mm',
+ LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY, LT',
} 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) {
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',
y : 'ur bloaz',
yy : specialMutationForYears
},
+ ordinalParse: /\d{1,2}(añ|vet)/,
ordinal : function (number) {
var output = (number === 1) ? 'añ' : 'vet';
return number + output;
} 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) {
}
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',
y : 'godinu',
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
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.
} 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('_'),
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'
y : translate,
yy : translate
},
+ ordinalParse : /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
weekdaysMin : 'вр_тн_ыт_юн_кç_эр_шм'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD-MM-YYYY',
LL : 'YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]',
LLL : 'YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT',
y : 'пĕр çул',
yy : '%d çул'
},
+ ordinalParse: /\d{1,2}-мĕш/,
ordinal : '%d-мĕш',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
// 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',
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,
} 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', {
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',
y : 'et år',
yy : '%d år'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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) {
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',
y : processRelativeTime,
yy : processRelativeTime
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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) {
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',
y : processRelativeTime,
yy : processRelativeTime
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
relativeTime : {
future : 'σε %s',
past : '%s πριν',
- s : 'δευτερόλεπτα',
+ s : 'λίγα δεÏ\85Ï\84εÏ\81Ï\8cλεÏ\80Ï\84α',
m : 'ένα λεπτό',
mm : '%d λεπτά',
h : 'μία ώρα',
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.
} 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', {
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',
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' :
} 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', {
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',
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' :
} 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', {
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',
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' :
} 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', {
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',
y : 'jaro',
yy : '%d jaroj'
},
+ ordinalParse: /\d{1,2}a/,
ordinal : '%da',
week : {
dow : 1, // Monday is the first day of the week.
} 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('_'),
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',
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.
} 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) {
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',
y : processRelativeTime,
yy : processRelativeTime
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
y : 'urte bat',
yy : '%d urte'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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 = {
weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
return symbolMap[match];
}).replace(/,/g, '،');
},
+ ordinalParse: /\d{1,2}م/,
ordinal : '%dم',
week : {
dow : 6, // Saturday is the first day of the week.
} 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(' '),
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',
y : translate,
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
y : 'eitt ár',
yy : '%d ár'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
y : 'un an',
yy : '%d ans'
},
+ ordinalParse: /\d{1,2}(er|)/,
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
}
} 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', {
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',
y : 'un an',
yy : '%d ans'
},
+ ordinalParse: /\d{1,2}(er|)/,
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
},
} 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', {
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',
y : 'un ano',
yy : '%d anos'
},
+ ordinalParse : /\d{1,2}º/,
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D [ב]MMMM YYYY',
LLL : 'D [ב]MMMM YYYY LT',
} 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 = {
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',
} 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) {
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',
y : 'godinu',
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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(' ');
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',
y : translate,
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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) {
weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY թ.',
LLL : 'D MMMM YYYY թ., LT',
}
},
+ ordinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
ordinal: function (number, period) {
switch (period) {
case 'DDD':
} 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', {
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',
} 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) {
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',
y : translate,
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
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 : {
y : 'un anno',
yy : '%d anni'
},
+ ordinalParse : /\d{1,2}º/,
ordinal: '%dº',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
longDateFormat : {
LT : 'Ah時m分',
+ LTS : 'LTs秒',
L : 'YYYY/MM/DD',
LL : 'YYYY年M月D日',
LLL : 'YYYY年M月D日LT',
} 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) {
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',
y : 'წელი',
yy : '%d წელი'
},
+ ordinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
ordinal : function (number) {
if (number === 0) {
return number;
} 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', {
weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
longDateFormat: {
LT: 'HH:mm',
+ LTS : 'LT:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY LT',
} 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', {
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',
y : '일년',
yy : '%d년'
},
+ ordinalParse : /\d{1,2}일/,
ordinal : '%d일',
meridiemParse : /(오전|오후)/,
isPM : function (token) {
} 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) {
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',
y : processRelativeTime,
yy : '%d Joer'
},
+ ordinalParse: /\d{1,2}\./,
ordinal: '%d.',
week: {
dow: 1, // Monday is the first day of the week.
} 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 = {
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.]',
y : translateSingular,
yy : translate
},
+ ordinalParse: /\d{1,2}-oji/,
ordinal : function (number) {
return number + '-oji';
},
} 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 = {
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',
y : 'gadu',
yy : relativeTimeWithPlural
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
y : 'година',
yy : '%d години'
},
+ ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
ordinal : function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
} 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', {
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',
} 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 = {
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',
} 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', {
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',
} 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 = {
weekdaysMin: 'နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
longDateFormat: {
LT: 'HH:mm',
+ LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY LT',
} 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', {
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',
y : 'ett år',
yy : '%d år'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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 = {
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',
} 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('_'),
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',
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');
},
} 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', {
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',
y : 'eit år',
yy : '%d år'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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('_'),
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',
y : 'rok',
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
y : 'um ano',
yy : '%d anos'
},
+ ordinalParse: /\d{1,2}º/,
ordinal : '%dº'
});
}));
} 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', {
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',
y : 'um ano',
yy : '%d anos'
},
+ ordinalParse: /\d{1,2}º/,
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
} 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) {
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',
} 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) {
function monthsShortCaseReplace(m, format) {
var monthsShort = {
- 'nominative': 'янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
+ 'nominative': 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
'accusative': 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_')
},
'accusative': 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_')
},
- nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ?
+ nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/).test(format) ?
'accusative' :
'nominative';
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',
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'
}
},
+ ordinalParse: /\d{1,2}-(й|го|я)/,
ordinal: function (number, period) {
switch (period) {
case 'M':
} 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('_'),
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',
y : translate,
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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) {
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',
y : 'eno leto',
yy : translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
},
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
y : 'një vit',
yy : '%d vite'
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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 = {
weekdaysMin: ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'],
longDateFormat: {
LT: 'H:mm',
+ LTS : 'LT:ss',
L: 'DD. MM. YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY LT',
y : 'годину',
yy : translator.translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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 = {
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',
y : 'godinu',
yy : translator.translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
} 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', {
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',
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' :
} 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 = {
weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY, LT',
return symbolMap[match];
});
},*/
+ ordinalParse: /\d{1,2}வது/,
ordinal : function (number) {
return number + 'வது';
},
} 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', {
weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
longDateFormat : {
LT : 'H นาฬิกา m นาที',
+ LTS : 'LT s วินาที',
L : 'YYYY/MM/DD',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY เวลา LT',
} 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', {
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',
y : 'isang taon',
yy : '%d taon'
},
+ ordinalParse: /\d{1,2}/,
ordinal : function (number) {
return number;
},
} 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 = {
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',
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ı';
} 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', {
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',
} 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', {
weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS: 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
} 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) {
weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY р.',
LLL : 'D MMMM YYYY р., LT',
}
},
+ ordinalParse: /\d{1,2}-(й|го)/,
ordinal: function (number, period) {
switch (period) {
case 'M':
} 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', {
weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
longDateFormat : {
LT : 'HH:mm',
+ LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
} 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', {
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',
y : 'một năm',
yy : '%d năm'
},
+ ordinalParse: /\d{1,2}/,
ordinal : function (number) {
return number;
},
} 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', {
weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
longDateFormat : {
LT : 'Ah点mm',
+ LTS : 'Ah点m分s秒',
L : 'YYYY-MM-DD',
LL : 'YYYY年MMMD日',
LLL : 'YYYY年MMMD日LT',
},
sameElse : 'LL'
},
+ ordinalParse: /\d{1,2}(日|月|周)/,
ordinal : function (number, period) {
switch (period) {
case 'd':
} 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', {
weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
longDateFormat : {
LT : 'Ah點mm',
+ LTS : 'Ah點m分s秒',
L : 'YYYY年MMMD日',
LL : 'YYYY年MMMD日',
LLL : 'YYYY年MMMD日LT',
lastWeek : '[上]ddddLT',
sameElse : 'L'
},
+ ordinalParse: /\d{1,2}(日|月|週)/,
ordinal : function (number, period) {
switch (period) {
case 'd' :
//! moment.js
-//! version : 2.8.3
+//! version : 2.8.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
************************************/
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,
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,
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
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
zz : function () {
return this.zoneName();
},
+ x : function () {
+ return this.valueOf();
+ },
X : function () {
return this.unix();
},
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 :
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;
// 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();
+ }
}
/************************************
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('_'),
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;
}
}
},
_longDateFormat : {
+ LTS : 'h:mm:ss A',
LT : 'h:mm A',
L : 'MM/DD/YYYY',
LL : 'MMMM D, YYYY',
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 : {
return this._ordinal.replace('%d', number);
},
_ordinal : '%d',
+ _ordinalParse : /\d{1,2}/,
preparse : function (string) {
return string;
case 'a':
case 'A':
return config._locale._meridiemParse;
+ case 'x':
+ return parseTokenOffsetMs;
case 'X':
return parseTokenTimestampMs;
case 'Z':
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;
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;
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
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
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);
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) {
config._a = [
normalizedInput.year,
normalizedInput.month,
- normalizedInput.day,
+ normalizedInput.day || normalizedInput.date,
normalizedInput.hour,
normalizedInput.minute,
normalizedInput.second,
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;
if (config._isPm === false && config._a[HOUR] === 12) {
config._a[HOUR] = 0;
}
-
dateFromConfig(config);
checkOverflow(config);
}
function makeMoment(config) {
var input = config._i,
- format = config._f;
+ format = config._f,
+ res;
config._locale = config._locale || moment.localeData(config._l);
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) {
'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' : ''));
}
);
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]');
}
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 () {
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));
}
},
},
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();
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;
// 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' :