@daoyi/nmtl-ui 2.0.1-beta.142 → 2.0.1-beta.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4170,6 +4170,7 @@ var moment$1 = {exports: {}};
|
|
|
4170
4170
|
nullInput: false,
|
|
4171
4171
|
invalidEra: null,
|
|
4172
4172
|
invalidMonth: null,
|
|
4173
|
+
invalidOffset: null,
|
|
4173
4174
|
invalidFormat: false,
|
|
4174
4175
|
userInvalidated: false,
|
|
4175
4176
|
iso: false,
|
|
@@ -4207,25 +4208,27 @@ var moment$1 = {exports: {}};
|
|
|
4207
4208
|
};
|
|
4208
4209
|
}
|
|
4209
4210
|
|
|
4210
|
-
function isValid(m) {
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4211
|
+
function isValid$2(m) {
|
|
4212
|
+
var flags = null,
|
|
4213
|
+
parsedParts = false,
|
|
4214
|
+
isNowValid = m._d && !isNaN(m._d.getTime());
|
|
4215
|
+
if (isNowValid) {
|
|
4216
|
+
flags = getParsingFlags(m);
|
|
4217
|
+
parsedParts = some.call(flags.parsedDateParts, function (i) {
|
|
4218
|
+
return i != null;
|
|
4219
|
+
});
|
|
4220
|
+
isNowValid =
|
|
4221
|
+
flags.overflow < 0 &&
|
|
4222
|
+
!flags.empty &&
|
|
4223
|
+
!flags.invalidEra &&
|
|
4224
|
+
!flags.invalidMonth &&
|
|
4225
|
+
!flags.invalidOffset &&
|
|
4226
|
+
!flags.invalidWeekday &&
|
|
4227
|
+
!flags.weekdayMismatch &&
|
|
4228
|
+
!flags.nullInput &&
|
|
4229
|
+
!flags.invalidFormat &&
|
|
4230
|
+
!flags.userInvalidated &&
|
|
4231
|
+
(!flags.meridiem || (flags.meridiem && parsedParts));
|
|
4229
4232
|
if (m._strict) {
|
|
4230
4233
|
isNowValid =
|
|
4231
4234
|
isNowValid &&
|
|
@@ -4233,17 +4236,16 @@ var moment$1 = {exports: {}};
|
|
|
4233
4236
|
flags.unusedTokens.length === 0 &&
|
|
4234
4237
|
flags.bigHour === undefined;
|
|
4235
4238
|
}
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
}
|
|
4239
|
+
}
|
|
4240
|
+
if (Object.isFrozen == null || !Object.isFrozen(m)) {
|
|
4241
|
+
m._isValid = isNowValid;
|
|
4242
|
+
} else {
|
|
4243
|
+
return isNowValid;
|
|
4242
4244
|
}
|
|
4243
4245
|
return m._isValid;
|
|
4244
4246
|
}
|
|
4245
4247
|
|
|
4246
|
-
function createInvalid(flags) {
|
|
4248
|
+
function createInvalid$1(flags) {
|
|
4247
4249
|
var m = createUTC(NaN);
|
|
4248
4250
|
if (flags != null) {
|
|
4249
4251
|
extend(getParsingFlags(m), flags);
|
|
@@ -4389,7 +4391,7 @@ var moment$1 = {exports: {}};
|
|
|
4389
4391
|
hooks.deprecationHandler(name, msg);
|
|
4390
4392
|
}
|
|
4391
4393
|
if (!deprecations[name]) {
|
|
4392
|
-
warn(msg);
|
|
4394
|
+
warn(msg + '\n' + new Error().stack);
|
|
4393
4395
|
deprecations[name] = true;
|
|
4394
4396
|
}
|
|
4395
4397
|
}
|
|
@@ -4404,93 +4406,111 @@ var moment$1 = {exports: {}};
|
|
|
4404
4406
|
);
|
|
4405
4407
|
}
|
|
4406
4408
|
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4409
|
+
var aliases = {
|
|
4410
|
+
D: 'date',
|
|
4411
|
+
dates: 'date',
|
|
4412
|
+
date: 'date',
|
|
4413
|
+
d: 'day',
|
|
4414
|
+
days: 'day',
|
|
4415
|
+
day: 'day',
|
|
4416
|
+
e: 'weekday',
|
|
4417
|
+
weekdays: 'weekday',
|
|
4418
|
+
weekday: 'weekday',
|
|
4419
|
+
E: 'isoWeekday',
|
|
4420
|
+
isoweekdays: 'isoWeekday',
|
|
4421
|
+
isoweekday: 'isoWeekday',
|
|
4422
|
+
DDD: 'dayOfYear',
|
|
4423
|
+
dayofyears: 'dayOfYear',
|
|
4424
|
+
dayofyear: 'dayOfYear',
|
|
4425
|
+
h: 'hour',
|
|
4426
|
+
hours: 'hour',
|
|
4427
|
+
hour: 'hour',
|
|
4428
|
+
ms: 'millisecond',
|
|
4429
|
+
milliseconds: 'millisecond',
|
|
4430
|
+
millisecond: 'millisecond',
|
|
4431
|
+
m: 'minute',
|
|
4432
|
+
minutes: 'minute',
|
|
4433
|
+
minute: 'minute',
|
|
4434
|
+
M: 'month',
|
|
4435
|
+
months: 'month',
|
|
4436
|
+
month: 'month',
|
|
4437
|
+
Q: 'quarter',
|
|
4438
|
+
quarters: 'quarter',
|
|
4439
|
+
quarter: 'quarter',
|
|
4440
|
+
s: 'second',
|
|
4441
|
+
seconds: 'second',
|
|
4442
|
+
second: 'second',
|
|
4443
|
+
gg: 'weekYear',
|
|
4444
|
+
weekyears: 'weekYear',
|
|
4445
|
+
weekyear: 'weekYear',
|
|
4446
|
+
GG: 'isoWeekYear',
|
|
4447
|
+
isoweekyears: 'isoWeekYear',
|
|
4448
|
+
isoweekyear: 'isoWeekYear',
|
|
4449
|
+
w: 'week',
|
|
4450
|
+
weeks: 'week',
|
|
4451
|
+
week: 'week',
|
|
4452
|
+
W: 'isoWeek',
|
|
4453
|
+
isoweeks: 'isoWeek',
|
|
4454
|
+
isoweek: 'isoWeek',
|
|
4455
|
+
y: 'year',
|
|
4456
|
+
years: 'year',
|
|
4457
|
+
year: 'year',
|
|
4458
|
+
};
|
|
4459
|
+
|
|
4460
|
+
function normalizeUnits(units) {
|
|
4461
|
+
return typeof units === 'string'
|
|
4462
|
+
? aliases[units] || aliases[units.toLowerCase()]
|
|
4463
|
+
: undefined;
|
|
4428
4464
|
}
|
|
4429
4465
|
|
|
4430
|
-
function
|
|
4431
|
-
var
|
|
4466
|
+
function normalizeObjectUnits(inputObject) {
|
|
4467
|
+
var normalizedInput = {},
|
|
4468
|
+
normalizedProp,
|
|
4432
4469
|
prop;
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
} else if (childConfig[prop] != null) {
|
|
4440
|
-
res[prop] = childConfig[prop];
|
|
4441
|
-
} else {
|
|
4442
|
-
delete res[prop];
|
|
4470
|
+
|
|
4471
|
+
for (prop in inputObject) {
|
|
4472
|
+
if (hasOwnProp(inputObject, prop)) {
|
|
4473
|
+
normalizedProp = normalizeUnits(prop);
|
|
4474
|
+
if (normalizedProp) {
|
|
4475
|
+
normalizedInput[normalizedProp] = inputObject[prop];
|
|
4443
4476
|
}
|
|
4444
4477
|
}
|
|
4445
4478
|
}
|
|
4446
|
-
for (prop in parentConfig) {
|
|
4447
|
-
if (
|
|
4448
|
-
hasOwnProp(parentConfig, prop) &&
|
|
4449
|
-
!hasOwnProp(childConfig, prop) &&
|
|
4450
|
-
isObject(parentConfig[prop])
|
|
4451
|
-
) {
|
|
4452
|
-
// make sure changes to properties don't modify parent config
|
|
4453
|
-
res[prop] = extend({}, res[prop]);
|
|
4454
|
-
}
|
|
4455
|
-
}
|
|
4456
|
-
return res;
|
|
4457
|
-
}
|
|
4458
|
-
|
|
4459
|
-
function Locale(config) {
|
|
4460
|
-
if (config != null) {
|
|
4461
|
-
this.set(config);
|
|
4462
|
-
}
|
|
4463
|
-
}
|
|
4464
|
-
|
|
4465
|
-
var keys;
|
|
4466
4479
|
|
|
4467
|
-
|
|
4468
|
-
keys = Object.keys;
|
|
4469
|
-
} else {
|
|
4470
|
-
keys = function (obj) {
|
|
4471
|
-
var i,
|
|
4472
|
-
res = [];
|
|
4473
|
-
for (i in obj) {
|
|
4474
|
-
if (hasOwnProp(obj, i)) {
|
|
4475
|
-
res.push(i);
|
|
4476
|
-
}
|
|
4477
|
-
}
|
|
4478
|
-
return res;
|
|
4479
|
-
};
|
|
4480
|
+
return normalizedInput;
|
|
4480
4481
|
}
|
|
4481
4482
|
|
|
4482
|
-
var
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4483
|
+
var priorities = {
|
|
4484
|
+
date: 9,
|
|
4485
|
+
day: 11,
|
|
4486
|
+
weekday: 11,
|
|
4487
|
+
isoWeekday: 11,
|
|
4488
|
+
dayOfYear: 4,
|
|
4489
|
+
hour: 13,
|
|
4490
|
+
millisecond: 16,
|
|
4491
|
+
minute: 14,
|
|
4492
|
+
month: 8,
|
|
4493
|
+
quarter: 7,
|
|
4494
|
+
second: 15,
|
|
4495
|
+
weekYear: 1,
|
|
4496
|
+
isoWeekYear: 1,
|
|
4497
|
+
week: 5,
|
|
4498
|
+
isoWeek: 5,
|
|
4499
|
+
year: 1,
|
|
4489
4500
|
};
|
|
4490
4501
|
|
|
4491
|
-
function
|
|
4492
|
-
var
|
|
4493
|
-
|
|
4502
|
+
function getPrioritizedUnits(unitsObj) {
|
|
4503
|
+
var units = [],
|
|
4504
|
+
u;
|
|
4505
|
+
for (u in unitsObj) {
|
|
4506
|
+
if (hasOwnProp(unitsObj, u)) {
|
|
4507
|
+
units.push({ unit: u, priority: priorities[u] });
|
|
4508
|
+
}
|
|
4509
|
+
}
|
|
4510
|
+
units.sort(function (a, b) {
|
|
4511
|
+
return a.priority - b.priority;
|
|
4512
|
+
});
|
|
4513
|
+
return units;
|
|
4494
4514
|
}
|
|
4495
4515
|
|
|
4496
4516
|
function zeroFill(number, targetLength, forceSign) {
|
|
@@ -4505,7 +4525,7 @@ var moment$1 = {exports: {}};
|
|
|
4505
4525
|
}
|
|
4506
4526
|
|
|
4507
4527
|
var formattingTokens =
|
|
4508
|
-
/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
|
|
4528
|
+
/(\[[^\[]*\])|(\\e)|(\\)?(eHHmm|[Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
|
|
4509
4529
|
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
|
|
4510
4530
|
formatFunctions = {},
|
|
4511
4531
|
formatTokenFunctions = {};
|
|
@@ -4578,10 +4598,12 @@ var moment$1 = {exports: {}};
|
|
|
4578
4598
|
}
|
|
4579
4599
|
|
|
4580
4600
|
format = expandFormat(format, m.localeData());
|
|
4581
|
-
|
|
4582
|
-
|
|
4601
|
+
var cacheKey = '$' + format;
|
|
4602
|
+
if (!hasOwnProp(formatFunctions, cacheKey)) {
|
|
4603
|
+
formatFunctions[cacheKey] = makeFormatFunction(format);
|
|
4604
|
+
}
|
|
4583
4605
|
|
|
4584
|
-
return formatFunctions[
|
|
4606
|
+
return formatFunctions[cacheKey](m);
|
|
4585
4607
|
}
|
|
4586
4608
|
|
|
4587
4609
|
function expandFormat(format, locale) {
|
|
@@ -4604,157 +4626,186 @@ var moment$1 = {exports: {}};
|
|
|
4604
4626
|
return format;
|
|
4605
4627
|
}
|
|
4606
4628
|
|
|
4607
|
-
var
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
}
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
tok === 'DD' ||
|
|
4631
|
-
tok === 'dddd'
|
|
4632
|
-
) {
|
|
4633
|
-
return tok.slice(1);
|
|
4634
|
-
}
|
|
4635
|
-
return tok;
|
|
4636
|
-
})
|
|
4637
|
-
.join('');
|
|
4638
|
-
|
|
4639
|
-
return this._longDateFormat[key];
|
|
4640
|
-
}
|
|
4641
|
-
|
|
4642
|
-
var defaultInvalidDate = 'Invalid date';
|
|
4643
|
-
|
|
4644
|
-
function invalidDate() {
|
|
4645
|
-
return this._invalidDate;
|
|
4646
|
-
}
|
|
4629
|
+
var match1 = /\d/, // 0 - 9
|
|
4630
|
+
match2 = /\d\d/, // 00 - 99
|
|
4631
|
+
match3 = /\d{3}/, // 000 - 999
|
|
4632
|
+
match4 = /\d{4}/, // 0000 - 9999
|
|
4633
|
+
match6 = /[+-]?\d{6}/, // -999999 - 999999
|
|
4634
|
+
match1to2 = /\d\d?/, // 0 - 99
|
|
4635
|
+
match3to4 = /\d\d\d\d?/, // 999 - 9999
|
|
4636
|
+
match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
|
|
4637
|
+
match1to3 = /\d{1,3}/, // 0 - 999
|
|
4638
|
+
match1to4 = /\d{1,4}/, // 0 - 9999
|
|
4639
|
+
match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
|
|
4640
|
+
matchUnsigned = /\d+/, // 0 - inf
|
|
4641
|
+
matchSigned = /[+-]?\d+/, // -inf - inf
|
|
4642
|
+
matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
|
|
4643
|
+
matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
|
|
4644
|
+
matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
|
|
4645
|
+
// any word (or two) characters or numbers including two/three word month in arabic.
|
|
4646
|
+
// includes scottish gaelic two word and hyphenated months
|
|
4647
|
+
matchWord =
|
|
4648
|
+
/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
|
|
4649
|
+
match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
|
|
4650
|
+
match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
|
|
4651
|
+
regexes;
|
|
4647
4652
|
|
|
4648
|
-
|
|
4649
|
-
defaultDayOfMonthOrdinalParse = /\d{1,2}/;
|
|
4653
|
+
regexes = {};
|
|
4650
4654
|
|
|
4651
|
-
function
|
|
4652
|
-
|
|
4655
|
+
function addRegexToken(token, regex, strictRegex) {
|
|
4656
|
+
regexes[token] = isFunction(regex)
|
|
4657
|
+
? regex
|
|
4658
|
+
: function (isStrict, localeData) {
|
|
4659
|
+
return isStrict && strictRegex ? strictRegex : regex;
|
|
4660
|
+
};
|
|
4653
4661
|
}
|
|
4654
4662
|
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
ss: '%d seconds',
|
|
4660
|
-
m: 'a minute',
|
|
4661
|
-
mm: '%d minutes',
|
|
4662
|
-
h: 'an hour',
|
|
4663
|
-
hh: '%d hours',
|
|
4664
|
-
d: 'a day',
|
|
4665
|
-
dd: '%d days',
|
|
4666
|
-
w: 'a week',
|
|
4667
|
-
ww: '%d weeks',
|
|
4668
|
-
M: 'a month',
|
|
4669
|
-
MM: '%d months',
|
|
4670
|
-
y: 'a year',
|
|
4671
|
-
yy: '%d years',
|
|
4672
|
-
};
|
|
4663
|
+
function getParseRegexForToken(token, config) {
|
|
4664
|
+
if (!hasOwnProp(regexes, token)) {
|
|
4665
|
+
return new RegExp(unescapeFormat(token));
|
|
4666
|
+
}
|
|
4673
4667
|
|
|
4674
|
-
|
|
4675
|
-
var output = this._relativeTime[string];
|
|
4676
|
-
return isFunction(output)
|
|
4677
|
-
? output(number, withoutSuffix, string, isFuture)
|
|
4678
|
-
: output.replace(/%d/i, number);
|
|
4668
|
+
return regexes[token](config._strict, config._locale);
|
|
4679
4669
|
}
|
|
4680
4670
|
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
return
|
|
4671
|
+
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
|
4672
|
+
function unescapeFormat(s) {
|
|
4673
|
+
return regexEscape(
|
|
4674
|
+
s
|
|
4675
|
+
.replace('\\', '')
|
|
4676
|
+
.replace(
|
|
4677
|
+
/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
|
|
4678
|
+
function (matched, p1, p2, p3, p4) {
|
|
4679
|
+
return p1 || p2 || p3 || p4;
|
|
4680
|
+
}
|
|
4681
|
+
)
|
|
4682
|
+
);
|
|
4684
4683
|
}
|
|
4685
4684
|
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
function addUnitAlias(unit, shorthand) {
|
|
4689
|
-
var lowerCase = unit.toLowerCase();
|
|
4690
|
-
aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
|
|
4685
|
+
function regexEscape(s) {
|
|
4686
|
+
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
4691
4687
|
}
|
|
4692
4688
|
|
|
4693
|
-
function
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4689
|
+
function absFloor(number) {
|
|
4690
|
+
if (number < 0) {
|
|
4691
|
+
// -0 -> 0
|
|
4692
|
+
return Math.ceil(number) || 0;
|
|
4693
|
+
} else {
|
|
4694
|
+
return Math.floor(number);
|
|
4695
|
+
}
|
|
4697
4696
|
}
|
|
4698
4697
|
|
|
4699
|
-
function
|
|
4700
|
-
var
|
|
4701
|
-
|
|
4702
|
-
prop;
|
|
4698
|
+
function toInt(argumentForCoercion) {
|
|
4699
|
+
var coercedNumber = +argumentForCoercion,
|
|
4700
|
+
value = 0;
|
|
4703
4701
|
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
normalizedProp = normalizeUnits(prop);
|
|
4707
|
-
if (normalizedProp) {
|
|
4708
|
-
normalizedInput[normalizedProp] = inputObject[prop];
|
|
4709
|
-
}
|
|
4710
|
-
}
|
|
4702
|
+
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
|
|
4703
|
+
value = absFloor(coercedNumber);
|
|
4711
4704
|
}
|
|
4712
4705
|
|
|
4713
|
-
return
|
|
4706
|
+
return value;
|
|
4714
4707
|
}
|
|
4715
4708
|
|
|
4716
|
-
var
|
|
4709
|
+
var tokens = {};
|
|
4717
4710
|
|
|
4718
|
-
function
|
|
4719
|
-
|
|
4711
|
+
function addParseToken(token, callback) {
|
|
4712
|
+
var i,
|
|
4713
|
+
func = callback,
|
|
4714
|
+
tokenLen;
|
|
4715
|
+
if (typeof token === 'string') {
|
|
4716
|
+
token = [token];
|
|
4717
|
+
}
|
|
4718
|
+
if (isNumber(callback)) {
|
|
4719
|
+
func = function (input, array) {
|
|
4720
|
+
array[callback] = toInt(input);
|
|
4721
|
+
};
|
|
4722
|
+
}
|
|
4723
|
+
tokenLen = token.length;
|
|
4724
|
+
for (i = 0; i < tokenLen; i++) {
|
|
4725
|
+
tokens[token[i]] = func;
|
|
4726
|
+
}
|
|
4720
4727
|
}
|
|
4721
4728
|
|
|
4722
|
-
function
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
if (hasOwnProp(unitsObj, u)) {
|
|
4727
|
-
units.push({ unit: u, priority: priorities[u] });
|
|
4728
|
-
}
|
|
4729
|
-
}
|
|
4730
|
-
units.sort(function (a, b) {
|
|
4731
|
-
return a.priority - b.priority;
|
|
4729
|
+
function addWeekParseToken(token, callback) {
|
|
4730
|
+
addParseToken(token, function (input, array, config, token) {
|
|
4731
|
+
config._w = config._w || {};
|
|
4732
|
+
callback(input, config._w, config, token);
|
|
4732
4733
|
});
|
|
4733
|
-
|
|
4734
|
+
}
|
|
4735
|
+
|
|
4736
|
+
function addTimeToArrayFromToken(token, input, config) {
|
|
4737
|
+
if (input != null && hasOwnProp(tokens, token)) {
|
|
4738
|
+
tokens[token](input, config._a, config, token);
|
|
4739
|
+
}
|
|
4734
4740
|
}
|
|
4735
4741
|
|
|
4736
4742
|
function isLeapYear(year) {
|
|
4737
4743
|
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
|
|
4738
4744
|
}
|
|
4739
4745
|
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4746
|
+
var YEAR = 0,
|
|
4747
|
+
MONTH = 1,
|
|
4748
|
+
DATE = 2,
|
|
4749
|
+
HOUR = 3,
|
|
4750
|
+
MINUTE = 4,
|
|
4751
|
+
SECOND = 5,
|
|
4752
|
+
MILLISECOND = 6,
|
|
4753
|
+
WEEK = 7,
|
|
4754
|
+
WEEKDAY = 8;
|
|
4755
|
+
|
|
4756
|
+
// FORMATTING
|
|
4757
|
+
|
|
4758
|
+
addFormatToken('Y', 0, 0, function () {
|
|
4759
|
+
var y = this.year();
|
|
4760
|
+
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
|
|
4761
|
+
});
|
|
4762
|
+
|
|
4763
|
+
addFormatToken(0, ['YY', 2], 0, function () {
|
|
4764
|
+
return this.year() % 100;
|
|
4765
|
+
});
|
|
4766
|
+
|
|
4767
|
+
addFormatToken(0, ['YYYY', 4], 0, 'year');
|
|
4768
|
+
addFormatToken(0, ['YYYYY', 5], 0, 'year');
|
|
4769
|
+
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
|
|
4770
|
+
|
|
4771
|
+
// PARSING
|
|
4772
|
+
|
|
4773
|
+
addRegexToken('Y', matchSigned);
|
|
4774
|
+
addRegexToken('YY', match1to2, match2);
|
|
4775
|
+
addRegexToken('YYYY', match1to4, match4);
|
|
4776
|
+
addRegexToken('YYYYY', match1to6, match6);
|
|
4777
|
+
addRegexToken('YYYYYY', match1to6, match6);
|
|
4778
|
+
|
|
4779
|
+
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
|
|
4780
|
+
addParseToken('YYYY', function (input, array) {
|
|
4781
|
+
array[YEAR] =
|
|
4782
|
+
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
|
|
4783
|
+
});
|
|
4784
|
+
addParseToken('YY', function (input, array) {
|
|
4785
|
+
array[YEAR] = hooks.parseTwoDigitYear(input);
|
|
4786
|
+
});
|
|
4787
|
+
addParseToken('Y', function (input, array) {
|
|
4788
|
+
array[YEAR] = parseInt(input, 10);
|
|
4789
|
+
});
|
|
4790
|
+
|
|
4791
|
+
// HELPERS
|
|
4792
|
+
|
|
4793
|
+
function daysInYear(year) {
|
|
4794
|
+
return isLeapYear(year) ? 366 : 365;
|
|
4747
4795
|
}
|
|
4748
4796
|
|
|
4749
|
-
|
|
4750
|
-
var coercedNumber = +argumentForCoercion,
|
|
4751
|
-
value = 0;
|
|
4797
|
+
// HOOKS
|
|
4752
4798
|
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4799
|
+
hooks.parseTwoDigitYear = function (input) {
|
|
4800
|
+
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
|
|
4801
|
+
};
|
|
4756
4802
|
|
|
4757
|
-
|
|
4803
|
+
// MOMENTS
|
|
4804
|
+
|
|
4805
|
+
var getSetYear = makeGetSet('FullYear', true);
|
|
4806
|
+
|
|
4807
|
+
function getIsLeapYear() {
|
|
4808
|
+
return isLeapYear(this.year());
|
|
4758
4809
|
}
|
|
4759
4810
|
|
|
4760
4811
|
function makeGetSet(unit, keepTime) {
|
|
@@ -4764,35 +4815,81 @@ var moment$1 = {exports: {}};
|
|
|
4764
4815
|
hooks.updateOffset(this, keepTime);
|
|
4765
4816
|
return this;
|
|
4766
4817
|
} else {
|
|
4767
|
-
return get(this, unit);
|
|
4818
|
+
return get$2(this, unit);
|
|
4768
4819
|
}
|
|
4769
4820
|
};
|
|
4770
4821
|
}
|
|
4771
4822
|
|
|
4772
|
-
function get(mom, unit) {
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4823
|
+
function get$2(mom, unit) {
|
|
4824
|
+
if (!mom.isValid()) {
|
|
4825
|
+
return NaN;
|
|
4826
|
+
}
|
|
4827
|
+
|
|
4828
|
+
var d = mom._d,
|
|
4829
|
+
isUTC = mom._isUTC;
|
|
4830
|
+
|
|
4831
|
+
switch (unit) {
|
|
4832
|
+
case 'Milliseconds':
|
|
4833
|
+
return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
|
|
4834
|
+
case 'Seconds':
|
|
4835
|
+
return isUTC ? d.getUTCSeconds() : d.getSeconds();
|
|
4836
|
+
case 'Minutes':
|
|
4837
|
+
return isUTC ? d.getUTCMinutes() : d.getMinutes();
|
|
4838
|
+
case 'Hours':
|
|
4839
|
+
return isUTC ? d.getUTCHours() : d.getHours();
|
|
4840
|
+
case 'Date':
|
|
4841
|
+
return isUTC ? d.getUTCDate() : d.getDate();
|
|
4842
|
+
case 'Day':
|
|
4843
|
+
return isUTC ? d.getUTCDay() : d.getDay();
|
|
4844
|
+
case 'Month':
|
|
4845
|
+
return isUTC ? d.getUTCMonth() : d.getMonth();
|
|
4846
|
+
case 'FullYear':
|
|
4847
|
+
return isUTC ? d.getUTCFullYear() : d.getFullYear();
|
|
4848
|
+
default:
|
|
4849
|
+
return NaN; // Just in case
|
|
4850
|
+
}
|
|
4776
4851
|
}
|
|
4777
4852
|
|
|
4778
4853
|
function set$1(mom, unit, value) {
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
mom.month() === 1 &&
|
|
4784
|
-
mom.date() === 29
|
|
4785
|
-
) {
|
|
4786
|
-
value = toInt(value);
|
|
4787
|
-
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
|
|
4788
|
-
value,
|
|
4789
|
-
mom.month(),
|
|
4790
|
-
daysInMonth(value, mom.month())
|
|
4791
|
-
);
|
|
4792
|
-
} else {
|
|
4793
|
-
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
|
|
4794
|
-
}
|
|
4854
|
+
var d, isUTC, year, month, date;
|
|
4855
|
+
|
|
4856
|
+
if (!mom.isValid() || isNaN(value)) {
|
|
4857
|
+
return;
|
|
4795
4858
|
}
|
|
4859
|
+
|
|
4860
|
+
d = mom._d;
|
|
4861
|
+
isUTC = mom._isUTC;
|
|
4862
|
+
|
|
4863
|
+
switch (unit) {
|
|
4864
|
+
case 'Milliseconds':
|
|
4865
|
+
return void (isUTC
|
|
4866
|
+
? d.setUTCMilliseconds(value)
|
|
4867
|
+
: d.setMilliseconds(value));
|
|
4868
|
+
case 'Seconds':
|
|
4869
|
+
return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
|
|
4870
|
+
case 'Minutes':
|
|
4871
|
+
return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
|
|
4872
|
+
case 'Hours':
|
|
4873
|
+
return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
|
|
4874
|
+
case 'Date':
|
|
4875
|
+
return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
|
|
4876
|
+
// case 'Day': // Not real
|
|
4877
|
+
// return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
|
|
4878
|
+
// case 'Month': // Not used because we need to pass two variables
|
|
4879
|
+
// return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
|
|
4880
|
+
case 'FullYear':
|
|
4881
|
+
break; // See below ...
|
|
4882
|
+
default:
|
|
4883
|
+
return; // Just in case
|
|
4884
|
+
}
|
|
4885
|
+
|
|
4886
|
+
year = value;
|
|
4887
|
+
month = mom.month();
|
|
4888
|
+
date = mom.date();
|
|
4889
|
+
date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
|
|
4890
|
+
void (isUTC
|
|
4891
|
+
? d.setUTCFullYear(year, month, date)
|
|
4892
|
+
: d.setFullYear(year, month, date));
|
|
4796
4893
|
}
|
|
4797
4894
|
|
|
4798
4895
|
// MOMENTS
|
|
@@ -4823,108 +4920,7 @@ var moment$1 = {exports: {}};
|
|
|
4823
4920
|
return this;
|
|
4824
4921
|
}
|
|
4825
4922
|
|
|
4826
|
-
|
|
4827
|
-
match2 = /\d\d/, // 00 - 99
|
|
4828
|
-
match3 = /\d{3}/, // 000 - 999
|
|
4829
|
-
match4 = /\d{4}/, // 0000 - 9999
|
|
4830
|
-
match6 = /[+-]?\d{6}/, // -999999 - 999999
|
|
4831
|
-
match1to2 = /\d\d?/, // 0 - 99
|
|
4832
|
-
match3to4 = /\d\d\d\d?/, // 999 - 9999
|
|
4833
|
-
match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
|
|
4834
|
-
match1to3 = /\d{1,3}/, // 0 - 999
|
|
4835
|
-
match1to4 = /\d{1,4}/, // 0 - 9999
|
|
4836
|
-
match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
|
|
4837
|
-
matchUnsigned = /\d+/, // 0 - inf
|
|
4838
|
-
matchSigned = /[+-]?\d+/, // -inf - inf
|
|
4839
|
-
matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
|
|
4840
|
-
matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
|
|
4841
|
-
matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
|
|
4842
|
-
// any word (or two) characters or numbers including two/three word month in arabic.
|
|
4843
|
-
// includes scottish gaelic two word and hyphenated months
|
|
4844
|
-
matchWord =
|
|
4845
|
-
/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
|
|
4846
|
-
regexes;
|
|
4847
|
-
|
|
4848
|
-
regexes = {};
|
|
4849
|
-
|
|
4850
|
-
function addRegexToken(token, regex, strictRegex) {
|
|
4851
|
-
regexes[token] = isFunction(regex)
|
|
4852
|
-
? regex
|
|
4853
|
-
: function (isStrict, localeData) {
|
|
4854
|
-
return isStrict && strictRegex ? strictRegex : regex;
|
|
4855
|
-
};
|
|
4856
|
-
}
|
|
4857
|
-
|
|
4858
|
-
function getParseRegexForToken(token, config) {
|
|
4859
|
-
if (!hasOwnProp(regexes, token)) {
|
|
4860
|
-
return new RegExp(unescapeFormat(token));
|
|
4861
|
-
}
|
|
4862
|
-
|
|
4863
|
-
return regexes[token](config._strict, config._locale);
|
|
4864
|
-
}
|
|
4865
|
-
|
|
4866
|
-
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
|
4867
|
-
function unescapeFormat(s) {
|
|
4868
|
-
return regexEscape(
|
|
4869
|
-
s
|
|
4870
|
-
.replace('\\', '')
|
|
4871
|
-
.replace(
|
|
4872
|
-
/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
|
|
4873
|
-
function (matched, p1, p2, p3, p4) {
|
|
4874
|
-
return p1 || p2 || p3 || p4;
|
|
4875
|
-
}
|
|
4876
|
-
)
|
|
4877
|
-
);
|
|
4878
|
-
}
|
|
4879
|
-
|
|
4880
|
-
function regexEscape(s) {
|
|
4881
|
-
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
4882
|
-
}
|
|
4883
|
-
|
|
4884
|
-
var tokens = {};
|
|
4885
|
-
|
|
4886
|
-
function addParseToken(token, callback) {
|
|
4887
|
-
var i,
|
|
4888
|
-
func = callback,
|
|
4889
|
-
tokenLen;
|
|
4890
|
-
if (typeof token === 'string') {
|
|
4891
|
-
token = [token];
|
|
4892
|
-
}
|
|
4893
|
-
if (isNumber(callback)) {
|
|
4894
|
-
func = function (input, array) {
|
|
4895
|
-
array[callback] = toInt(input);
|
|
4896
|
-
};
|
|
4897
|
-
}
|
|
4898
|
-
tokenLen = token.length;
|
|
4899
|
-
for (i = 0; i < tokenLen; i++) {
|
|
4900
|
-
tokens[token[i]] = func;
|
|
4901
|
-
}
|
|
4902
|
-
}
|
|
4903
|
-
|
|
4904
|
-
function addWeekParseToken(token, callback) {
|
|
4905
|
-
addParseToken(token, function (input, array, config, token) {
|
|
4906
|
-
config._w = config._w || {};
|
|
4907
|
-
callback(input, config._w, config, token);
|
|
4908
|
-
});
|
|
4909
|
-
}
|
|
4910
|
-
|
|
4911
|
-
function addTimeToArrayFromToken(token, input, config) {
|
|
4912
|
-
if (input != null && hasOwnProp(tokens, token)) {
|
|
4913
|
-
tokens[token](input, config._a, config, token);
|
|
4914
|
-
}
|
|
4915
|
-
}
|
|
4916
|
-
|
|
4917
|
-
var YEAR = 0,
|
|
4918
|
-
MONTH = 1,
|
|
4919
|
-
DATE = 2,
|
|
4920
|
-
HOUR = 3,
|
|
4921
|
-
MINUTE = 4,
|
|
4922
|
-
SECOND = 5,
|
|
4923
|
-
MILLISECOND = 6,
|
|
4924
|
-
WEEK = 7,
|
|
4925
|
-
WEEKDAY = 8;
|
|
4926
|
-
|
|
4927
|
-
function mod(n, x) {
|
|
4923
|
+
function mod$1(n, x) {
|
|
4928
4924
|
return ((n % x) + x) % x;
|
|
4929
4925
|
}
|
|
4930
4926
|
|
|
@@ -4949,7 +4945,7 @@ var moment$1 = {exports: {}};
|
|
|
4949
4945
|
if (isNaN(year) || isNaN(month)) {
|
|
4950
4946
|
return NaN;
|
|
4951
4947
|
}
|
|
4952
|
-
var modMonth = mod(month, 12);
|
|
4948
|
+
var modMonth = mod$1(month, 12);
|
|
4953
4949
|
year += (month - modMonth) / 12;
|
|
4954
4950
|
return modMonth === 1
|
|
4955
4951
|
? isLeapYear(year)
|
|
@@ -4972,17 +4968,9 @@ var moment$1 = {exports: {}};
|
|
|
4972
4968
|
return this.localeData().months(this, format);
|
|
4973
4969
|
});
|
|
4974
4970
|
|
|
4975
|
-
// ALIASES
|
|
4976
|
-
|
|
4977
|
-
addUnitAlias('month', 'M');
|
|
4978
|
-
|
|
4979
|
-
// PRIORITY
|
|
4980
|
-
|
|
4981
|
-
addUnitPriority('month', 8);
|
|
4982
|
-
|
|
4983
4971
|
// PARSING
|
|
4984
4972
|
|
|
4985
|
-
addRegexToken('M', match1to2);
|
|
4973
|
+
addRegexToken('M', match1to2, match1to2NoLeadingZero);
|
|
4986
4974
|
addRegexToken('MM', match1to2, match2);
|
|
4987
4975
|
addRegexToken('MMM', function (isStrict, locale) {
|
|
4988
4976
|
return locale.monthsShortRegex(isStrict);
|
|
@@ -5015,7 +5003,26 @@ var moment$1 = {exports: {}};
|
|
|
5015
5003
|
'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
|
|
5016
5004
|
MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
|
|
5017
5005
|
defaultMonthsShortRegex = matchWord,
|
|
5018
|
-
defaultMonthsRegex = matchWord
|
|
5006
|
+
defaultMonthsRegex = matchWord,
|
|
5007
|
+
monthsParseProperties = [
|
|
5008
|
+
'monthsParse',
|
|
5009
|
+
'longMonthsParse',
|
|
5010
|
+
'shortMonthsParse',
|
|
5011
|
+
'monthsRegex',
|
|
5012
|
+
'monthsShortRegex',
|
|
5013
|
+
'monthsStrictRegex',
|
|
5014
|
+
'monthsShortStrictRegex',
|
|
5015
|
+
];
|
|
5016
|
+
|
|
5017
|
+
function clearMonthsParseCache(locale, config) {
|
|
5018
|
+
var i, prop;
|
|
5019
|
+
for (i = 0; i < monthsParseProperties.length; i++) {
|
|
5020
|
+
prop = monthsParseProperties[i];
|
|
5021
|
+
if (!hasOwnProp(config, prop)) {
|
|
5022
|
+
delete locale['_' + prop];
|
|
5023
|
+
}
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5019
5026
|
|
|
5020
5027
|
function localeMonths(m, format) {
|
|
5021
5028
|
if (!m) {
|
|
@@ -5045,7 +5052,7 @@ var moment$1 = {exports: {}};
|
|
|
5045
5052
|
][m.month()];
|
|
5046
5053
|
}
|
|
5047
5054
|
|
|
5048
|
-
function handleStrictParse(monthName, format, strict) {
|
|
5055
|
+
function handleStrictParse$1(monthName, format, strict) {
|
|
5049
5056
|
var i,
|
|
5050
5057
|
ii,
|
|
5051
5058
|
mom,
|
|
@@ -5096,7 +5103,7 @@ var moment$1 = {exports: {}};
|
|
|
5096
5103
|
var i, mom, regex;
|
|
5097
5104
|
|
|
5098
5105
|
if (this._monthsParseExact) {
|
|
5099
|
-
return handleStrictParse.call(this, monthName, format, strict);
|
|
5106
|
+
return handleStrictParse$1.call(this, monthName, format, strict);
|
|
5100
5107
|
}
|
|
5101
5108
|
|
|
5102
5109
|
if (!this._monthsParse) {
|
|
@@ -5148,8 +5155,6 @@ var moment$1 = {exports: {}};
|
|
|
5148
5155
|
// MOMENTS
|
|
5149
5156
|
|
|
5150
5157
|
function setMonth(mom, value) {
|
|
5151
|
-
var dayOfMonth;
|
|
5152
|
-
|
|
5153
5158
|
if (!mom.isValid()) {
|
|
5154
5159
|
// No op
|
|
5155
5160
|
return mom;
|
|
@@ -5167,8 +5172,13 @@ var moment$1 = {exports: {}};
|
|
|
5167
5172
|
}
|
|
5168
5173
|
}
|
|
5169
5174
|
|
|
5170
|
-
|
|
5171
|
-
|
|
5175
|
+
var month = value,
|
|
5176
|
+
date = mom.date();
|
|
5177
|
+
|
|
5178
|
+
date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
|
|
5179
|
+
void (mom._isUTC
|
|
5180
|
+
? mom._d.setUTCMonth(month, date)
|
|
5181
|
+
: mom._d.setMonth(month, date));
|
|
5172
5182
|
return mom;
|
|
5173
5183
|
}
|
|
5174
5184
|
|
|
@@ -5178,7 +5188,7 @@ var moment$1 = {exports: {}};
|
|
|
5178
5188
|
hooks.updateOffset(this, true);
|
|
5179
5189
|
return this;
|
|
5180
5190
|
} else {
|
|
5181
|
-
return get(this, 'Month');
|
|
5191
|
+
return get$2(this, 'Month');
|
|
5182
5192
|
}
|
|
5183
5193
|
}
|
|
5184
5194
|
|
|
@@ -5235,27 +5245,24 @@ var moment$1 = {exports: {}};
|
|
|
5235
5245
|
longPieces = [],
|
|
5236
5246
|
mixedPieces = [],
|
|
5237
5247
|
i,
|
|
5238
|
-
mom
|
|
5248
|
+
mom,
|
|
5249
|
+
shortP,
|
|
5250
|
+
longP;
|
|
5239
5251
|
for (i = 0; i < 12; i++) {
|
|
5240
5252
|
// make the regex if we don't have it already
|
|
5241
5253
|
mom = createUTC([2000, i]);
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5254
|
+
shortP = regexEscape(this.monthsShort(mom, ''));
|
|
5255
|
+
longP = regexEscape(this.months(mom, ''));
|
|
5256
|
+
shortPieces.push(shortP);
|
|
5257
|
+
longPieces.push(longP);
|
|
5258
|
+
mixedPieces.push(longP);
|
|
5259
|
+
mixedPieces.push(shortP);
|
|
5246
5260
|
}
|
|
5247
5261
|
// Sorting makes sure if one month (or abbr) is a prefix of another it
|
|
5248
5262
|
// will match the longer piece.
|
|
5249
5263
|
shortPieces.sort(cmpLenRev);
|
|
5250
5264
|
longPieces.sort(cmpLenRev);
|
|
5251
5265
|
mixedPieces.sort(cmpLenRev);
|
|
5252
|
-
for (i = 0; i < 12; i++) {
|
|
5253
|
-
shortPieces[i] = regexEscape(shortPieces[i]);
|
|
5254
|
-
longPieces[i] = regexEscape(longPieces[i]);
|
|
5255
|
-
}
|
|
5256
|
-
for (i = 0; i < 24; i++) {
|
|
5257
|
-
mixedPieces[i] = regexEscape(mixedPieces[i]);
|
|
5258
|
-
}
|
|
5259
5266
|
|
|
5260
5267
|
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
|
|
5261
5268
|
this._monthsShortRegex = this._monthsRegex;
|
|
@@ -5271,239 +5278,14 @@ var moment$1 = {exports: {}};
|
|
|
5271
5278
|
|
|
5272
5279
|
// FORMATTING
|
|
5273
5280
|
|
|
5274
|
-
addFormatToken('
|
|
5275
|
-
|
|
5276
|
-
|
|
5281
|
+
addFormatToken('d', 0, 'do', 'day');
|
|
5282
|
+
|
|
5283
|
+
addFormatToken('dd', 0, 0, function (format) {
|
|
5284
|
+
return this.localeData().weekdaysMin(this, format);
|
|
5277
5285
|
});
|
|
5278
5286
|
|
|
5279
|
-
addFormatToken(
|
|
5280
|
-
return this.
|
|
5281
|
-
});
|
|
5282
|
-
|
|
5283
|
-
addFormatToken(0, ['YYYY', 4], 0, 'year');
|
|
5284
|
-
addFormatToken(0, ['YYYYY', 5], 0, 'year');
|
|
5285
|
-
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
|
|
5286
|
-
|
|
5287
|
-
// ALIASES
|
|
5288
|
-
|
|
5289
|
-
addUnitAlias('year', 'y');
|
|
5290
|
-
|
|
5291
|
-
// PRIORITIES
|
|
5292
|
-
|
|
5293
|
-
addUnitPriority('year', 1);
|
|
5294
|
-
|
|
5295
|
-
// PARSING
|
|
5296
|
-
|
|
5297
|
-
addRegexToken('Y', matchSigned);
|
|
5298
|
-
addRegexToken('YY', match1to2, match2);
|
|
5299
|
-
addRegexToken('YYYY', match1to4, match4);
|
|
5300
|
-
addRegexToken('YYYYY', match1to6, match6);
|
|
5301
|
-
addRegexToken('YYYYYY', match1to6, match6);
|
|
5302
|
-
|
|
5303
|
-
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
|
|
5304
|
-
addParseToken('YYYY', function (input, array) {
|
|
5305
|
-
array[YEAR] =
|
|
5306
|
-
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
|
|
5307
|
-
});
|
|
5308
|
-
addParseToken('YY', function (input, array) {
|
|
5309
|
-
array[YEAR] = hooks.parseTwoDigitYear(input);
|
|
5310
|
-
});
|
|
5311
|
-
addParseToken('Y', function (input, array) {
|
|
5312
|
-
array[YEAR] = parseInt(input, 10);
|
|
5313
|
-
});
|
|
5314
|
-
|
|
5315
|
-
// HELPERS
|
|
5316
|
-
|
|
5317
|
-
function daysInYear(year) {
|
|
5318
|
-
return isLeapYear(year) ? 366 : 365;
|
|
5319
|
-
}
|
|
5320
|
-
|
|
5321
|
-
// HOOKS
|
|
5322
|
-
|
|
5323
|
-
hooks.parseTwoDigitYear = function (input) {
|
|
5324
|
-
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
|
|
5325
|
-
};
|
|
5326
|
-
|
|
5327
|
-
// MOMENTS
|
|
5328
|
-
|
|
5329
|
-
var getSetYear = makeGetSet('FullYear', true);
|
|
5330
|
-
|
|
5331
|
-
function getIsLeapYear() {
|
|
5332
|
-
return isLeapYear(this.year());
|
|
5333
|
-
}
|
|
5334
|
-
|
|
5335
|
-
function createDate(y, m, d, h, M, s, ms) {
|
|
5336
|
-
// can't just apply() to create a date:
|
|
5337
|
-
// https://stackoverflow.com/q/181348
|
|
5338
|
-
var date;
|
|
5339
|
-
// the date constructor remaps years 0-99 to 1900-1999
|
|
5340
|
-
if (y < 100 && y >= 0) {
|
|
5341
|
-
// preserve leap years using a full 400 year cycle, then reset
|
|
5342
|
-
date = new Date(y + 400, m, d, h, M, s, ms);
|
|
5343
|
-
if (isFinite(date.getFullYear())) {
|
|
5344
|
-
date.setFullYear(y);
|
|
5345
|
-
}
|
|
5346
|
-
} else {
|
|
5347
|
-
date = new Date(y, m, d, h, M, s, ms);
|
|
5348
|
-
}
|
|
5349
|
-
|
|
5350
|
-
return date;
|
|
5351
|
-
}
|
|
5352
|
-
|
|
5353
|
-
function createUTCDate(y) {
|
|
5354
|
-
var date, args;
|
|
5355
|
-
// the Date.UTC function remaps years 0-99 to 1900-1999
|
|
5356
|
-
if (y < 100 && y >= 0) {
|
|
5357
|
-
args = Array.prototype.slice.call(arguments);
|
|
5358
|
-
// preserve leap years using a full 400 year cycle, then reset
|
|
5359
|
-
args[0] = y + 400;
|
|
5360
|
-
date = new Date(Date.UTC.apply(null, args));
|
|
5361
|
-
if (isFinite(date.getUTCFullYear())) {
|
|
5362
|
-
date.setUTCFullYear(y);
|
|
5363
|
-
}
|
|
5364
|
-
} else {
|
|
5365
|
-
date = new Date(Date.UTC.apply(null, arguments));
|
|
5366
|
-
}
|
|
5367
|
-
|
|
5368
|
-
return date;
|
|
5369
|
-
}
|
|
5370
|
-
|
|
5371
|
-
// start-of-first-week - start-of-year
|
|
5372
|
-
function firstWeekOffset(year, dow, doy) {
|
|
5373
|
-
var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
|
|
5374
|
-
fwd = 7 + dow - doy,
|
|
5375
|
-
// first-week day local weekday -- which local weekday is fwd
|
|
5376
|
-
fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
|
|
5377
|
-
|
|
5378
|
-
return -fwdlw + fwd - 1;
|
|
5379
|
-
}
|
|
5380
|
-
|
|
5381
|
-
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
|
|
5382
|
-
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
|
|
5383
|
-
var localWeekday = (7 + weekday - dow) % 7,
|
|
5384
|
-
weekOffset = firstWeekOffset(year, dow, doy),
|
|
5385
|
-
dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
|
|
5386
|
-
resYear,
|
|
5387
|
-
resDayOfYear;
|
|
5388
|
-
|
|
5389
|
-
if (dayOfYear <= 0) {
|
|
5390
|
-
resYear = year - 1;
|
|
5391
|
-
resDayOfYear = daysInYear(resYear) + dayOfYear;
|
|
5392
|
-
} else if (dayOfYear > daysInYear(year)) {
|
|
5393
|
-
resYear = year + 1;
|
|
5394
|
-
resDayOfYear = dayOfYear - daysInYear(year);
|
|
5395
|
-
} else {
|
|
5396
|
-
resYear = year;
|
|
5397
|
-
resDayOfYear = dayOfYear;
|
|
5398
|
-
}
|
|
5399
|
-
|
|
5400
|
-
return {
|
|
5401
|
-
year: resYear,
|
|
5402
|
-
dayOfYear: resDayOfYear,
|
|
5403
|
-
};
|
|
5404
|
-
}
|
|
5405
|
-
|
|
5406
|
-
function weekOfYear(mom, dow, doy) {
|
|
5407
|
-
var weekOffset = firstWeekOffset(mom.year(), dow, doy),
|
|
5408
|
-
week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
|
|
5409
|
-
resWeek,
|
|
5410
|
-
resYear;
|
|
5411
|
-
|
|
5412
|
-
if (week < 1) {
|
|
5413
|
-
resYear = mom.year() - 1;
|
|
5414
|
-
resWeek = week + weeksInYear(resYear, dow, doy);
|
|
5415
|
-
} else if (week > weeksInYear(mom.year(), dow, doy)) {
|
|
5416
|
-
resWeek = week - weeksInYear(mom.year(), dow, doy);
|
|
5417
|
-
resYear = mom.year() + 1;
|
|
5418
|
-
} else {
|
|
5419
|
-
resYear = mom.year();
|
|
5420
|
-
resWeek = week;
|
|
5421
|
-
}
|
|
5422
|
-
|
|
5423
|
-
return {
|
|
5424
|
-
week: resWeek,
|
|
5425
|
-
year: resYear,
|
|
5426
|
-
};
|
|
5427
|
-
}
|
|
5428
|
-
|
|
5429
|
-
function weeksInYear(year, dow, doy) {
|
|
5430
|
-
var weekOffset = firstWeekOffset(year, dow, doy),
|
|
5431
|
-
weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
|
|
5432
|
-
return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
|
|
5433
|
-
}
|
|
5434
|
-
|
|
5435
|
-
// FORMATTING
|
|
5436
|
-
|
|
5437
|
-
addFormatToken('w', ['ww', 2], 'wo', 'week');
|
|
5438
|
-
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
|
|
5439
|
-
|
|
5440
|
-
// ALIASES
|
|
5441
|
-
|
|
5442
|
-
addUnitAlias('week', 'w');
|
|
5443
|
-
addUnitAlias('isoWeek', 'W');
|
|
5444
|
-
|
|
5445
|
-
// PRIORITIES
|
|
5446
|
-
|
|
5447
|
-
addUnitPriority('week', 5);
|
|
5448
|
-
addUnitPriority('isoWeek', 5);
|
|
5449
|
-
|
|
5450
|
-
// PARSING
|
|
5451
|
-
|
|
5452
|
-
addRegexToken('w', match1to2);
|
|
5453
|
-
addRegexToken('ww', match1to2, match2);
|
|
5454
|
-
addRegexToken('W', match1to2);
|
|
5455
|
-
addRegexToken('WW', match1to2, match2);
|
|
5456
|
-
|
|
5457
|
-
addWeekParseToken(
|
|
5458
|
-
['w', 'ww', 'W', 'WW'],
|
|
5459
|
-
function (input, week, config, token) {
|
|
5460
|
-
week[token.substr(0, 1)] = toInt(input);
|
|
5461
|
-
}
|
|
5462
|
-
);
|
|
5463
|
-
|
|
5464
|
-
// HELPERS
|
|
5465
|
-
|
|
5466
|
-
// LOCALES
|
|
5467
|
-
|
|
5468
|
-
function localeWeek(mom) {
|
|
5469
|
-
return weekOfYear(mom, this._week.dow, this._week.doy).week;
|
|
5470
|
-
}
|
|
5471
|
-
|
|
5472
|
-
var defaultLocaleWeek = {
|
|
5473
|
-
dow: 0, // Sunday is the first day of the week.
|
|
5474
|
-
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
|
5475
|
-
};
|
|
5476
|
-
|
|
5477
|
-
function localeFirstDayOfWeek() {
|
|
5478
|
-
return this._week.dow;
|
|
5479
|
-
}
|
|
5480
|
-
|
|
5481
|
-
function localeFirstDayOfYear() {
|
|
5482
|
-
return this._week.doy;
|
|
5483
|
-
}
|
|
5484
|
-
|
|
5485
|
-
// MOMENTS
|
|
5486
|
-
|
|
5487
|
-
function getSetWeek(input) {
|
|
5488
|
-
var week = this.localeData().week(this);
|
|
5489
|
-
return input == null ? week : this.add((input - week) * 7, 'd');
|
|
5490
|
-
}
|
|
5491
|
-
|
|
5492
|
-
function getSetISOWeek(input) {
|
|
5493
|
-
var week = weekOfYear(this, 1, 4).week;
|
|
5494
|
-
return input == null ? week : this.add((input - week) * 7, 'd');
|
|
5495
|
-
}
|
|
5496
|
-
|
|
5497
|
-
// FORMATTING
|
|
5498
|
-
|
|
5499
|
-
addFormatToken('d', 0, 'do', 'day');
|
|
5500
|
-
|
|
5501
|
-
addFormatToken('dd', 0, 0, function (format) {
|
|
5502
|
-
return this.localeData().weekdaysMin(this, format);
|
|
5503
|
-
});
|
|
5504
|
-
|
|
5505
|
-
addFormatToken('ddd', 0, 0, function (format) {
|
|
5506
|
-
return this.localeData().weekdaysShort(this, format);
|
|
5287
|
+
addFormatToken('ddd', 0, 0, function (format) {
|
|
5288
|
+
return this.localeData().weekdaysShort(this, format);
|
|
5507
5289
|
});
|
|
5508
5290
|
|
|
5509
5291
|
addFormatToken('dddd', 0, 0, function (format) {
|
|
@@ -5512,23 +5294,21 @@ var moment$1 = {exports: {}};
|
|
|
5512
5294
|
|
|
5513
5295
|
addFormatToken('e', 0, 0, 'weekday');
|
|
5514
5296
|
addFormatToken('E', 0, 0, 'isoWeekday');
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
addUnitPriority('day', 11);
|
|
5524
|
-
addUnitPriority('weekday', 11);
|
|
5525
|
-
addUnitPriority('isoWeekday', 11);
|
|
5297
|
+
addFormatToken('eHHmm', 0, 0, function () {
|
|
5298
|
+
return (
|
|
5299
|
+
'' +
|
|
5300
|
+
this.weekday() +
|
|
5301
|
+
zeroFill(this.hours(), 2) +
|
|
5302
|
+
zeroFill(this.minutes(), 2)
|
|
5303
|
+
);
|
|
5304
|
+
});
|
|
5526
5305
|
|
|
5527
5306
|
// PARSING
|
|
5528
5307
|
|
|
5529
5308
|
addRegexToken('d', match1to2);
|
|
5530
5309
|
addRegexToken('e', match1to2);
|
|
5531
5310
|
addRegexToken('E', match1to2);
|
|
5311
|
+
addRegexToken('eHHmm', match5to6);
|
|
5532
5312
|
addRegexToken('dd', function (isStrict, locale) {
|
|
5533
5313
|
return locale.weekdaysMinRegex(isStrict);
|
|
5534
5314
|
});
|
|
@@ -5553,6 +5333,14 @@ var moment$1 = {exports: {}};
|
|
|
5553
5333
|
week[token] = toInt(input);
|
|
5554
5334
|
});
|
|
5555
5335
|
|
|
5336
|
+
addWeekParseToken('eHHmm', function (input, week, config) {
|
|
5337
|
+
var weekdayEnd = input.length - 4;
|
|
5338
|
+
|
|
5339
|
+
week.e = toInt(input.substr(0, weekdayEnd));
|
|
5340
|
+
config._a[HOUR] = toInt(input.substr(weekdayEnd, 2));
|
|
5341
|
+
config._a[MINUTE] = toInt(input.substr(weekdayEnd + 2));
|
|
5342
|
+
});
|
|
5343
|
+
|
|
5556
5344
|
// HELPERS
|
|
5557
5345
|
|
|
5558
5346
|
function parseWeekday(input, locale) {
|
|
@@ -5590,7 +5378,29 @@ var moment$1 = {exports: {}};
|
|
|
5590
5378
|
defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
|
|
5591
5379
|
defaultWeekdaysRegex = matchWord,
|
|
5592
5380
|
defaultWeekdaysShortRegex = matchWord,
|
|
5593
|
-
defaultWeekdaysMinRegex = matchWord
|
|
5381
|
+
defaultWeekdaysMinRegex = matchWord,
|
|
5382
|
+
weekdaysParseProperties = [
|
|
5383
|
+
'weekdaysParse',
|
|
5384
|
+
'fullWeekdaysParse',
|
|
5385
|
+
'shortWeekdaysParse',
|
|
5386
|
+
'minWeekdaysParse',
|
|
5387
|
+
'weekdaysRegex',
|
|
5388
|
+
'weekdaysShortRegex',
|
|
5389
|
+
'weekdaysMinRegex',
|
|
5390
|
+
'weekdaysStrictRegex',
|
|
5391
|
+
'weekdaysShortStrictRegex',
|
|
5392
|
+
'weekdaysMinStrictRegex',
|
|
5393
|
+
];
|
|
5394
|
+
|
|
5395
|
+
function clearWeekdaysParseCache(locale, config) {
|
|
5396
|
+
var i, prop;
|
|
5397
|
+
for (i = 0; i < weekdaysParseProperties.length; i++) {
|
|
5398
|
+
prop = weekdaysParseProperties[i];
|
|
5399
|
+
if (!hasOwnProp(config, prop)) {
|
|
5400
|
+
delete locale['_' + prop];
|
|
5401
|
+
}
|
|
5402
|
+
}
|
|
5403
|
+
}
|
|
5594
5404
|
|
|
5595
5405
|
function localeWeekdays(m, format) {
|
|
5596
5406
|
var weekdays = isArray(this._weekdays)
|
|
@@ -5603,27 +5413,27 @@ var moment$1 = {exports: {}};
|
|
|
5603
5413
|
return m === true
|
|
5604
5414
|
? shiftWeekdays(weekdays, this._week.dow)
|
|
5605
5415
|
: m
|
|
5606
|
-
|
|
5607
|
-
|
|
5416
|
+
? weekdays[m.day()]
|
|
5417
|
+
: weekdays;
|
|
5608
5418
|
}
|
|
5609
5419
|
|
|
5610
5420
|
function localeWeekdaysShort(m) {
|
|
5611
5421
|
return m === true
|
|
5612
5422
|
? shiftWeekdays(this._weekdaysShort, this._week.dow)
|
|
5613
5423
|
: m
|
|
5614
|
-
|
|
5615
|
-
|
|
5424
|
+
? this._weekdaysShort[m.day()]
|
|
5425
|
+
: this._weekdaysShort;
|
|
5616
5426
|
}
|
|
5617
5427
|
|
|
5618
5428
|
function localeWeekdaysMin(m) {
|
|
5619
5429
|
return m === true
|
|
5620
5430
|
? shiftWeekdays(this._weekdaysMin, this._week.dow)
|
|
5621
5431
|
: m
|
|
5622
|
-
|
|
5623
|
-
|
|
5432
|
+
? this._weekdaysMin[m.day()]
|
|
5433
|
+
: this._weekdaysMin;
|
|
5624
5434
|
}
|
|
5625
5435
|
|
|
5626
|
-
function handleStrictParse
|
|
5436
|
+
function handleStrictParse(weekdayName, format, strict) {
|
|
5627
5437
|
var i,
|
|
5628
5438
|
ii,
|
|
5629
5439
|
mom,
|
|
@@ -5700,7 +5510,7 @@ var moment$1 = {exports: {}};
|
|
|
5700
5510
|
var i, mom, regex;
|
|
5701
5511
|
|
|
5702
5512
|
if (this._weekdaysParseExact) {
|
|
5703
|
-
return handleStrictParse
|
|
5513
|
+
return handleStrictParse.call(this, weekdayName, format, strict);
|
|
5704
5514
|
}
|
|
5705
5515
|
|
|
5706
5516
|
if (!this._weekdaysParse) {
|
|
@@ -5769,7 +5579,8 @@ var moment$1 = {exports: {}};
|
|
|
5769
5579
|
if (!this.isValid()) {
|
|
5770
5580
|
return input != null ? this : NaN;
|
|
5771
5581
|
}
|
|
5772
|
-
|
|
5582
|
+
|
|
5583
|
+
var day = get$2(this, 'Day');
|
|
5773
5584
|
if (input != null) {
|
|
5774
5585
|
input = parseWeekday(input, this.localeData());
|
|
5775
5586
|
return this.add(input - day, 'd');
|
|
@@ -5823,96 +5634,471 @@ var moment$1 = {exports: {}};
|
|
|
5823
5634
|
}
|
|
5824
5635
|
}
|
|
5825
5636
|
|
|
5826
|
-
function weekdaysShortRegex(isStrict) {
|
|
5827
|
-
if (this._weekdaysParseExact) {
|
|
5828
|
-
if (!hasOwnProp(this, '_weekdaysRegex')) {
|
|
5829
|
-
computeWeekdaysParse.call(this);
|
|
5830
|
-
}
|
|
5831
|
-
if (isStrict) {
|
|
5832
|
-
return this._weekdaysShortStrictRegex;
|
|
5833
|
-
} else {
|
|
5834
|
-
return this._weekdaysShortRegex;
|
|
5835
|
-
}
|
|
5836
|
-
} else {
|
|
5837
|
-
if (!hasOwnProp(this, '_weekdaysShortRegex')) {
|
|
5838
|
-
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
|
|
5839
|
-
}
|
|
5840
|
-
return this._weekdaysShortStrictRegex && isStrict
|
|
5841
|
-
? this._weekdaysShortStrictRegex
|
|
5842
|
-
: this._weekdaysShortRegex;
|
|
5637
|
+
function weekdaysShortRegex(isStrict) {
|
|
5638
|
+
if (this._weekdaysParseExact) {
|
|
5639
|
+
if (!hasOwnProp(this, '_weekdaysRegex')) {
|
|
5640
|
+
computeWeekdaysParse.call(this);
|
|
5641
|
+
}
|
|
5642
|
+
if (isStrict) {
|
|
5643
|
+
return this._weekdaysShortStrictRegex;
|
|
5644
|
+
} else {
|
|
5645
|
+
return this._weekdaysShortRegex;
|
|
5646
|
+
}
|
|
5647
|
+
} else {
|
|
5648
|
+
if (!hasOwnProp(this, '_weekdaysShortRegex')) {
|
|
5649
|
+
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
|
|
5650
|
+
}
|
|
5651
|
+
return this._weekdaysShortStrictRegex && isStrict
|
|
5652
|
+
? this._weekdaysShortStrictRegex
|
|
5653
|
+
: this._weekdaysShortRegex;
|
|
5654
|
+
}
|
|
5655
|
+
}
|
|
5656
|
+
|
|
5657
|
+
function weekdaysMinRegex(isStrict) {
|
|
5658
|
+
if (this._weekdaysParseExact) {
|
|
5659
|
+
if (!hasOwnProp(this, '_weekdaysRegex')) {
|
|
5660
|
+
computeWeekdaysParse.call(this);
|
|
5661
|
+
}
|
|
5662
|
+
if (isStrict) {
|
|
5663
|
+
return this._weekdaysMinStrictRegex;
|
|
5664
|
+
} else {
|
|
5665
|
+
return this._weekdaysMinRegex;
|
|
5666
|
+
}
|
|
5667
|
+
} else {
|
|
5668
|
+
if (!hasOwnProp(this, '_weekdaysMinRegex')) {
|
|
5669
|
+
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
|
|
5670
|
+
}
|
|
5671
|
+
return this._weekdaysMinStrictRegex && isStrict
|
|
5672
|
+
? this._weekdaysMinStrictRegex
|
|
5673
|
+
: this._weekdaysMinRegex;
|
|
5674
|
+
}
|
|
5675
|
+
}
|
|
5676
|
+
|
|
5677
|
+
function computeWeekdaysParse() {
|
|
5678
|
+
function cmpLenRev(a, b) {
|
|
5679
|
+
return b.length - a.length;
|
|
5680
|
+
}
|
|
5681
|
+
|
|
5682
|
+
var minPieces = [],
|
|
5683
|
+
shortPieces = [],
|
|
5684
|
+
longPieces = [],
|
|
5685
|
+
mixedPieces = [],
|
|
5686
|
+
i,
|
|
5687
|
+
mom,
|
|
5688
|
+
minp,
|
|
5689
|
+
shortp,
|
|
5690
|
+
longp;
|
|
5691
|
+
for (i = 0; i < 7; i++) {
|
|
5692
|
+
// make the regex if we don't have it already
|
|
5693
|
+
mom = createUTC([2000, 1]).day(i);
|
|
5694
|
+
minp = regexEscape(this.weekdaysMin(mom, ''));
|
|
5695
|
+
shortp = regexEscape(this.weekdaysShort(mom, ''));
|
|
5696
|
+
longp = regexEscape(this.weekdays(mom, ''));
|
|
5697
|
+
minPieces.push(minp);
|
|
5698
|
+
shortPieces.push(shortp);
|
|
5699
|
+
longPieces.push(longp);
|
|
5700
|
+
mixedPieces.push(minp);
|
|
5701
|
+
mixedPieces.push(shortp);
|
|
5702
|
+
mixedPieces.push(longp);
|
|
5703
|
+
}
|
|
5704
|
+
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
|
|
5705
|
+
// will match the longer piece.
|
|
5706
|
+
minPieces.sort(cmpLenRev);
|
|
5707
|
+
shortPieces.sort(cmpLenRev);
|
|
5708
|
+
longPieces.sort(cmpLenRev);
|
|
5709
|
+
mixedPieces.sort(cmpLenRev);
|
|
5710
|
+
|
|
5711
|
+
this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
|
|
5712
|
+
this._weekdaysShortRegex = this._weekdaysRegex;
|
|
5713
|
+
this._weekdaysMinRegex = this._weekdaysRegex;
|
|
5714
|
+
|
|
5715
|
+
this._weekdaysStrictRegex = new RegExp(
|
|
5716
|
+
'^(' + longPieces.join('|') + ')',
|
|
5717
|
+
'i'
|
|
5718
|
+
);
|
|
5719
|
+
this._weekdaysShortStrictRegex = new RegExp(
|
|
5720
|
+
'^(' + shortPieces.join('|') + ')',
|
|
5721
|
+
'i'
|
|
5722
|
+
);
|
|
5723
|
+
this._weekdaysMinStrictRegex = new RegExp(
|
|
5724
|
+
'^(' + minPieces.join('|') + ')',
|
|
5725
|
+
'i'
|
|
5726
|
+
);
|
|
5727
|
+
}
|
|
5728
|
+
|
|
5729
|
+
function set(config) {
|
|
5730
|
+
var prop, i;
|
|
5731
|
+
clearMonthsParseCache(this, config);
|
|
5732
|
+
clearWeekdaysParseCache(this, config);
|
|
5733
|
+
for (i in config) {
|
|
5734
|
+
if (hasOwnProp(config, i)) {
|
|
5735
|
+
prop = config[i];
|
|
5736
|
+
if (isFunction(prop)) {
|
|
5737
|
+
this[i] = prop;
|
|
5738
|
+
} else {
|
|
5739
|
+
this['_' + i] = prop;
|
|
5740
|
+
}
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
this._config = config;
|
|
5744
|
+
// Lenient ordinal parsing accepts just a number in addition to
|
|
5745
|
+
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
|
|
5746
|
+
// TODO: Remove "ordinalParse" fallback in next major release.
|
|
5747
|
+
this._dayOfMonthOrdinalParseLenient = new RegExp(
|
|
5748
|
+
(this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
|
|
5749
|
+
'|' +
|
|
5750
|
+
/\d{1,2}/.source
|
|
5751
|
+
);
|
|
5752
|
+
}
|
|
5753
|
+
|
|
5754
|
+
function mergeConfigs(parentConfig, childConfig) {
|
|
5755
|
+
var res = extend({}, parentConfig),
|
|
5756
|
+
prop;
|
|
5757
|
+
for (prop in childConfig) {
|
|
5758
|
+
if (hasOwnProp(childConfig, prop)) {
|
|
5759
|
+
if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
|
|
5760
|
+
res[prop] = {};
|
|
5761
|
+
extend(res[prop], parentConfig[prop]);
|
|
5762
|
+
extend(res[prop], childConfig[prop]);
|
|
5763
|
+
} else if (childConfig[prop] != null) {
|
|
5764
|
+
res[prop] = childConfig[prop];
|
|
5765
|
+
} else {
|
|
5766
|
+
delete res[prop];
|
|
5767
|
+
}
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5770
|
+
for (prop in parentConfig) {
|
|
5771
|
+
if (
|
|
5772
|
+
hasOwnProp(parentConfig, prop) &&
|
|
5773
|
+
!hasOwnProp(childConfig, prop) &&
|
|
5774
|
+
isObject(parentConfig[prop])
|
|
5775
|
+
) {
|
|
5776
|
+
// make sure changes to properties don't modify parent config
|
|
5777
|
+
res[prop] = extend({}, res[prop]);
|
|
5778
|
+
}
|
|
5779
|
+
}
|
|
5780
|
+
return res;
|
|
5781
|
+
}
|
|
5782
|
+
|
|
5783
|
+
function Locale(config) {
|
|
5784
|
+
if (config != null) {
|
|
5785
|
+
this.set(config);
|
|
5786
|
+
}
|
|
5787
|
+
}
|
|
5788
|
+
|
|
5789
|
+
var keys;
|
|
5790
|
+
|
|
5791
|
+
if (Object.keys) {
|
|
5792
|
+
keys = Object.keys;
|
|
5793
|
+
} else {
|
|
5794
|
+
keys = function (obj) {
|
|
5795
|
+
var i,
|
|
5796
|
+
res = [];
|
|
5797
|
+
for (i in obj) {
|
|
5798
|
+
if (hasOwnProp(obj, i)) {
|
|
5799
|
+
res.push(i);
|
|
5800
|
+
}
|
|
5801
|
+
}
|
|
5802
|
+
return res;
|
|
5803
|
+
};
|
|
5804
|
+
}
|
|
5805
|
+
|
|
5806
|
+
var defaultCalendar = {
|
|
5807
|
+
sameDay: '[Today at] LT',
|
|
5808
|
+
nextDay: '[Tomorrow at] LT',
|
|
5809
|
+
nextWeek: 'dddd [at] LT',
|
|
5810
|
+
lastDay: '[Yesterday at] LT',
|
|
5811
|
+
lastWeek: '[Last] dddd [at] LT',
|
|
5812
|
+
sameElse: 'L',
|
|
5813
|
+
};
|
|
5814
|
+
|
|
5815
|
+
function calendar$1(key, mom, now) {
|
|
5816
|
+
var output = this._calendar[key] || this._calendar['sameElse'];
|
|
5817
|
+
return isFunction(output) ? output.call(mom, now) : output;
|
|
5818
|
+
}
|
|
5819
|
+
|
|
5820
|
+
var defaultLongDateFormat = {
|
|
5821
|
+
LTS: 'h:mm:ss A',
|
|
5822
|
+
LT: 'h:mm A',
|
|
5823
|
+
L: 'MM/DD/YYYY',
|
|
5824
|
+
LL: 'MMMM D, YYYY',
|
|
5825
|
+
LLL: 'MMMM D, YYYY h:mm A',
|
|
5826
|
+
LLLL: 'dddd, MMMM D, YYYY h:mm A',
|
|
5827
|
+
};
|
|
5828
|
+
|
|
5829
|
+
function longDateFormat(key) {
|
|
5830
|
+
var format = this._longDateFormat[key],
|
|
5831
|
+
formatUpper = this._longDateFormat[key.toUpperCase()],
|
|
5832
|
+
formatCache = this._longDateFormatCache;
|
|
5833
|
+
|
|
5834
|
+
if (format || !formatUpper) {
|
|
5835
|
+
return format;
|
|
5836
|
+
}
|
|
5837
|
+
|
|
5838
|
+
if (
|
|
5839
|
+
formatCache &&
|
|
5840
|
+
formatCache[key] &&
|
|
5841
|
+
formatCache[key].formatUpper === formatUpper
|
|
5842
|
+
) {
|
|
5843
|
+
return formatCache[key].format;
|
|
5844
|
+
}
|
|
5845
|
+
|
|
5846
|
+
format = formatUpper
|
|
5847
|
+
.match(formattingTokens)
|
|
5848
|
+
.map(function (tok) {
|
|
5849
|
+
if (
|
|
5850
|
+
tok === 'MMMM' ||
|
|
5851
|
+
tok === 'MM' ||
|
|
5852
|
+
tok === 'DD' ||
|
|
5853
|
+
tok === 'dddd'
|
|
5854
|
+
) {
|
|
5855
|
+
return tok.slice(1);
|
|
5856
|
+
}
|
|
5857
|
+
return tok;
|
|
5858
|
+
})
|
|
5859
|
+
.join('');
|
|
5860
|
+
|
|
5861
|
+
if (!formatCache) {
|
|
5862
|
+
formatCache = this._longDateFormatCache = {};
|
|
5863
|
+
}
|
|
5864
|
+
formatCache[key] = {
|
|
5865
|
+
formatUpper: formatUpper,
|
|
5866
|
+
format: format,
|
|
5867
|
+
};
|
|
5868
|
+
return format;
|
|
5869
|
+
}
|
|
5870
|
+
|
|
5871
|
+
var defaultInvalidDate = 'Invalid date';
|
|
5872
|
+
|
|
5873
|
+
function invalidDate() {
|
|
5874
|
+
return this._invalidDate;
|
|
5875
|
+
}
|
|
5876
|
+
|
|
5877
|
+
var defaultOrdinal = '%d',
|
|
5878
|
+
defaultDayOfMonthOrdinalParse = /\d{1,2}/;
|
|
5879
|
+
|
|
5880
|
+
function ordinal(number) {
|
|
5881
|
+
return this._ordinal.replace('%d', number);
|
|
5882
|
+
}
|
|
5883
|
+
|
|
5884
|
+
var defaultRelativeTime = {
|
|
5885
|
+
future: 'in %s',
|
|
5886
|
+
past: '%s ago',
|
|
5887
|
+
s: 'a few seconds',
|
|
5888
|
+
ss: '%d seconds',
|
|
5889
|
+
m: 'a minute',
|
|
5890
|
+
mm: '%d minutes',
|
|
5891
|
+
h: 'an hour',
|
|
5892
|
+
hh: '%d hours',
|
|
5893
|
+
d: 'a day',
|
|
5894
|
+
dd: '%d days',
|
|
5895
|
+
w: 'a week',
|
|
5896
|
+
ww: '%d weeks',
|
|
5897
|
+
M: 'a month',
|
|
5898
|
+
MM: '%d months',
|
|
5899
|
+
y: 'a year',
|
|
5900
|
+
yy: '%d years',
|
|
5901
|
+
};
|
|
5902
|
+
|
|
5903
|
+
function relativeTimeWithoutPostformat(
|
|
5904
|
+
number,
|
|
5905
|
+
withoutSuffix,
|
|
5906
|
+
string,
|
|
5907
|
+
isFuture
|
|
5908
|
+
) {
|
|
5909
|
+
var output = this._relativeTime[string];
|
|
5910
|
+
return isFunction(output)
|
|
5911
|
+
? output(number, withoutSuffix, string, isFuture)
|
|
5912
|
+
: output.replace(/%d/i, number);
|
|
5913
|
+
}
|
|
5914
|
+
|
|
5915
|
+
function relativeTime$1(number, withoutSuffix, string, isFuture) {
|
|
5916
|
+
return this.postformat(
|
|
5917
|
+
relativeTimeWithoutPostformat.call(
|
|
5918
|
+
this,
|
|
5919
|
+
number,
|
|
5920
|
+
withoutSuffix,
|
|
5921
|
+
string,
|
|
5922
|
+
isFuture
|
|
5923
|
+
)
|
|
5924
|
+
);
|
|
5925
|
+
}
|
|
5926
|
+
|
|
5927
|
+
function pastFutureWithoutPostformat(diff, output) {
|
|
5928
|
+
var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
|
|
5929
|
+
return isFunction(format) ? format(output) : format.replace(/%s/i, output);
|
|
5930
|
+
}
|
|
5931
|
+
|
|
5932
|
+
function pastFuture(diff, output) {
|
|
5933
|
+
return this.postformat(
|
|
5934
|
+
pastFutureWithoutPostformat.call(this, diff, output)
|
|
5935
|
+
);
|
|
5936
|
+
}
|
|
5937
|
+
|
|
5938
|
+
function createDate(y, m, d, h, M, s, ms) {
|
|
5939
|
+
// can't just apply() to create a date:
|
|
5940
|
+
// https://stackoverflow.com/q/181348
|
|
5941
|
+
var date;
|
|
5942
|
+
// the date constructor remaps years 0-99 to 1900-1999
|
|
5943
|
+
if (y < 100 && y >= 0) {
|
|
5944
|
+
// preserve leap years using a full 400 year cycle, then reset
|
|
5945
|
+
date = new Date(y + 400, m, d, h, M, s, ms);
|
|
5946
|
+
if (isFinite(date.getFullYear())) {
|
|
5947
|
+
date.setFullYear(y);
|
|
5948
|
+
}
|
|
5949
|
+
} else {
|
|
5950
|
+
date = new Date(y, m, d, h, M, s, ms);
|
|
5951
|
+
}
|
|
5952
|
+
|
|
5953
|
+
return date;
|
|
5954
|
+
}
|
|
5955
|
+
|
|
5956
|
+
function createUTCDate(y) {
|
|
5957
|
+
var date, args;
|
|
5958
|
+
// the Date.UTC function remaps years 0-99 to 1900-1999
|
|
5959
|
+
if (y < 100 && y >= 0) {
|
|
5960
|
+
args = Array.prototype.slice.call(arguments);
|
|
5961
|
+
// preserve leap years using a full 400 year cycle, then reset
|
|
5962
|
+
args[0] = y + 400;
|
|
5963
|
+
date = new Date(Date.UTC.apply(null, args));
|
|
5964
|
+
if (isFinite(date.getUTCFullYear())) {
|
|
5965
|
+
date.setUTCFullYear(y);
|
|
5966
|
+
}
|
|
5967
|
+
} else {
|
|
5968
|
+
date = new Date(Date.UTC.apply(null, arguments));
|
|
5969
|
+
}
|
|
5970
|
+
|
|
5971
|
+
return date;
|
|
5972
|
+
}
|
|
5973
|
+
|
|
5974
|
+
// start-of-first-week - start-of-year
|
|
5975
|
+
function firstWeekOffset(year, dow, doy) {
|
|
5976
|
+
var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
|
|
5977
|
+
fwd = 7 + dow - doy,
|
|
5978
|
+
// first-week day local weekday -- which local weekday is fwd
|
|
5979
|
+
fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
|
|
5980
|
+
|
|
5981
|
+
return -fwdlw + fwd - 1;
|
|
5982
|
+
}
|
|
5983
|
+
|
|
5984
|
+
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
|
|
5985
|
+
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
|
|
5986
|
+
var localWeekday = (7 + weekday - dow) % 7,
|
|
5987
|
+
weekOffset = firstWeekOffset(year, dow, doy),
|
|
5988
|
+
dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
|
|
5989
|
+
resYear,
|
|
5990
|
+
resDayOfYear;
|
|
5991
|
+
|
|
5992
|
+
if (dayOfYear <= 0) {
|
|
5993
|
+
resYear = year - 1;
|
|
5994
|
+
resDayOfYear = daysInYear(resYear) + dayOfYear;
|
|
5995
|
+
} else if (dayOfYear > daysInYear(year)) {
|
|
5996
|
+
resYear = year + 1;
|
|
5997
|
+
resDayOfYear = dayOfYear - daysInYear(year);
|
|
5998
|
+
} else {
|
|
5999
|
+
resYear = year;
|
|
6000
|
+
resDayOfYear = dayOfYear;
|
|
6001
|
+
}
|
|
6002
|
+
|
|
6003
|
+
return {
|
|
6004
|
+
year: resYear,
|
|
6005
|
+
dayOfYear: resDayOfYear,
|
|
6006
|
+
};
|
|
6007
|
+
}
|
|
6008
|
+
|
|
6009
|
+
function weekOfYearFromDayOfYear(year, dayOfYear, dow, doy) {
|
|
6010
|
+
var weekOffset = firstWeekOffset(year, dow, doy),
|
|
6011
|
+
week = Math.floor((dayOfYear - weekOffset - 1) / 7) + 1,
|
|
6012
|
+
resWeek,
|
|
6013
|
+
resYear;
|
|
6014
|
+
|
|
6015
|
+
if (week < 1) {
|
|
6016
|
+
resYear = year - 1;
|
|
6017
|
+
resWeek = week + weeksInYear(resYear, dow, doy);
|
|
6018
|
+
} else if (week > weeksInYear(year, dow, doy)) {
|
|
6019
|
+
resWeek = week - weeksInYear(year, dow, doy);
|
|
6020
|
+
resYear = year + 1;
|
|
6021
|
+
} else {
|
|
6022
|
+
resYear = year;
|
|
6023
|
+
resWeek = week;
|
|
6024
|
+
}
|
|
6025
|
+
|
|
6026
|
+
return {
|
|
6027
|
+
week: resWeek,
|
|
6028
|
+
year: resYear,
|
|
6029
|
+
};
|
|
6030
|
+
}
|
|
6031
|
+
|
|
6032
|
+
function weekOfYear(mom, dow, doy) {
|
|
6033
|
+
return weekOfYearFromDayOfYear(mom.year(), mom.dayOfYear(), dow, doy);
|
|
6034
|
+
}
|
|
6035
|
+
|
|
6036
|
+
function weekOfYearFromDate(year, month, date, dow, doy) {
|
|
6037
|
+
var dayOfYear =
|
|
6038
|
+
Math.round(
|
|
6039
|
+
(createUTCDate(year, month, date) - createUTCDate(year, 0, 1)) /
|
|
6040
|
+
864e5
|
|
6041
|
+
) + 1;
|
|
6042
|
+
|
|
6043
|
+
return weekOfYearFromDayOfYear(year, dayOfYear, dow, doy);
|
|
6044
|
+
}
|
|
6045
|
+
|
|
6046
|
+
function weeksInYear(year, dow, doy) {
|
|
6047
|
+
var weekOffset = firstWeekOffset(year, dow, doy),
|
|
6048
|
+
weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
|
|
6049
|
+
return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
|
|
6050
|
+
}
|
|
6051
|
+
|
|
6052
|
+
// FORMATTING
|
|
6053
|
+
|
|
6054
|
+
addFormatToken('w', ['ww', 2], 'wo', 'week');
|
|
6055
|
+
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
|
|
6056
|
+
|
|
6057
|
+
// PARSING
|
|
6058
|
+
|
|
6059
|
+
addRegexToken('w', match1to2, match1to2NoLeadingZero);
|
|
6060
|
+
addRegexToken('ww', match1to2, match2);
|
|
6061
|
+
addRegexToken('W', match1to2, match1to2NoLeadingZero);
|
|
6062
|
+
addRegexToken('WW', match1to2, match2);
|
|
6063
|
+
|
|
6064
|
+
addWeekParseToken(
|
|
6065
|
+
['w', 'ww', 'W', 'WW'],
|
|
6066
|
+
function (input, week, config, token) {
|
|
6067
|
+
week[token.substr(0, 1)] = toInt(input);
|
|
5843
6068
|
}
|
|
6069
|
+
);
|
|
6070
|
+
|
|
6071
|
+
// HELPERS
|
|
6072
|
+
|
|
6073
|
+
// LOCALES
|
|
6074
|
+
|
|
6075
|
+
function localeWeek(mom) {
|
|
6076
|
+
return weekOfYear(mom, this._week.dow, this._week.doy).week;
|
|
5844
6077
|
}
|
|
5845
6078
|
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
} else {
|
|
5854
|
-
return this._weekdaysMinRegex;
|
|
5855
|
-
}
|
|
5856
|
-
} else {
|
|
5857
|
-
if (!hasOwnProp(this, '_weekdaysMinRegex')) {
|
|
5858
|
-
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
|
|
5859
|
-
}
|
|
5860
|
-
return this._weekdaysMinStrictRegex && isStrict
|
|
5861
|
-
? this._weekdaysMinStrictRegex
|
|
5862
|
-
: this._weekdaysMinRegex;
|
|
5863
|
-
}
|
|
6079
|
+
var defaultLocaleWeek = {
|
|
6080
|
+
dow: 0, // Sunday is the first day of the week.
|
|
6081
|
+
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
|
6082
|
+
};
|
|
6083
|
+
|
|
6084
|
+
function localeFirstDayOfWeek() {
|
|
6085
|
+
return this._week.dow;
|
|
5864
6086
|
}
|
|
5865
6087
|
|
|
5866
|
-
function
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
}
|
|
6088
|
+
function localeFirstDayOfYear() {
|
|
6089
|
+
return this._week.doy;
|
|
6090
|
+
}
|
|
5870
6091
|
|
|
5871
|
-
|
|
5872
|
-
shortPieces = [],
|
|
5873
|
-
longPieces = [],
|
|
5874
|
-
mixedPieces = [],
|
|
5875
|
-
i,
|
|
5876
|
-
mom,
|
|
5877
|
-
minp,
|
|
5878
|
-
shortp,
|
|
5879
|
-
longp;
|
|
5880
|
-
for (i = 0; i < 7; i++) {
|
|
5881
|
-
// make the regex if we don't have it already
|
|
5882
|
-
mom = createUTC([2000, 1]).day(i);
|
|
5883
|
-
minp = regexEscape(this.weekdaysMin(mom, ''));
|
|
5884
|
-
shortp = regexEscape(this.weekdaysShort(mom, ''));
|
|
5885
|
-
longp = regexEscape(this.weekdays(mom, ''));
|
|
5886
|
-
minPieces.push(minp);
|
|
5887
|
-
shortPieces.push(shortp);
|
|
5888
|
-
longPieces.push(longp);
|
|
5889
|
-
mixedPieces.push(minp);
|
|
5890
|
-
mixedPieces.push(shortp);
|
|
5891
|
-
mixedPieces.push(longp);
|
|
5892
|
-
}
|
|
5893
|
-
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
|
|
5894
|
-
// will match the longer piece.
|
|
5895
|
-
minPieces.sort(cmpLenRev);
|
|
5896
|
-
shortPieces.sort(cmpLenRev);
|
|
5897
|
-
longPieces.sort(cmpLenRev);
|
|
5898
|
-
mixedPieces.sort(cmpLenRev);
|
|
6092
|
+
// MOMENTS
|
|
5899
6093
|
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
this.
|
|
6094
|
+
function getSetWeek(input) {
|
|
6095
|
+
var week = this.localeData().week(this);
|
|
6096
|
+
return input == null ? week : this.add((input - week) * 7, 'd');
|
|
6097
|
+
}
|
|
5903
6098
|
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
);
|
|
5908
|
-
this._weekdaysShortStrictRegex = new RegExp(
|
|
5909
|
-
'^(' + shortPieces.join('|') + ')',
|
|
5910
|
-
'i'
|
|
5911
|
-
);
|
|
5912
|
-
this._weekdaysMinStrictRegex = new RegExp(
|
|
5913
|
-
'^(' + minPieces.join('|') + ')',
|
|
5914
|
-
'i'
|
|
5915
|
-
);
|
|
6099
|
+
function getSetISOWeek(input) {
|
|
6100
|
+
var week = weekOfYear(this, 1, 4).week;
|
|
6101
|
+
return input == null ? week : this.add((input - week) * 7, 'd');
|
|
5916
6102
|
}
|
|
5917
6103
|
|
|
5918
6104
|
// FORMATTING
|
|
@@ -5968,13 +6154,6 @@ var moment$1 = {exports: {}};
|
|
|
5968
6154
|
meridiem('a', true);
|
|
5969
6155
|
meridiem('A', false);
|
|
5970
6156
|
|
|
5971
|
-
// ALIASES
|
|
5972
|
-
|
|
5973
|
-
addUnitAlias('hour', 'h');
|
|
5974
|
-
|
|
5975
|
-
// PRIORITY
|
|
5976
|
-
addUnitPriority('hour', 13);
|
|
5977
|
-
|
|
5978
6157
|
// PARSING
|
|
5979
6158
|
|
|
5980
6159
|
function matchMeridiem(isStrict, locale) {
|
|
@@ -5983,9 +6162,9 @@ var moment$1 = {exports: {}};
|
|
|
5983
6162
|
|
|
5984
6163
|
addRegexToken('a', matchMeridiem);
|
|
5985
6164
|
addRegexToken('A', matchMeridiem);
|
|
5986
|
-
addRegexToken('H', match1to2);
|
|
5987
|
-
addRegexToken('h', match1to2);
|
|
5988
|
-
addRegexToken('k', match1to2);
|
|
6165
|
+
addRegexToken('H', match1to2, match1to2HasZero);
|
|
6166
|
+
addRegexToken('h', match1to2, match1to2NoLeadingZero);
|
|
6167
|
+
addRegexToken('k', match1to2, match1to2NoLeadingZero);
|
|
5989
6168
|
addRegexToken('HH', match1to2, match2);
|
|
5990
6169
|
addRegexToken('hh', match1to2, match2);
|
|
5991
6170
|
addRegexToken('kk', match1to2, match2);
|
|
@@ -6134,33 +6313,48 @@ var moment$1 = {exports: {}};
|
|
|
6134
6313
|
}
|
|
6135
6314
|
|
|
6136
6315
|
function isLocaleNameSane(name) {
|
|
6137
|
-
//
|
|
6138
|
-
return name
|
|
6316
|
+
// Only canonical locale module names are safe to append to the require path.
|
|
6317
|
+
return typeof name === 'string' && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(name);
|
|
6139
6318
|
}
|
|
6140
6319
|
|
|
6141
6320
|
function loadLocale(name) {
|
|
6142
6321
|
var oldLocale = null,
|
|
6143
|
-
aliasedRequire
|
|
6322
|
+
aliasedRequire,
|
|
6323
|
+
normalizedName;
|
|
6324
|
+
|
|
6325
|
+
// Preserve exact custom locale names before trying the canonical built-in name.
|
|
6326
|
+
// Use hasOwnProp rather than a plain lookup so that names like "__proto__",
|
|
6327
|
+
// "constructor", or "prototype" can't resolve to an inherited Object.prototype
|
|
6328
|
+
// property instead of a real (or missing) locale entry.
|
|
6329
|
+
if (hasOwnProp(locales, name)) {
|
|
6330
|
+
return locales[name];
|
|
6331
|
+
}
|
|
6332
|
+
|
|
6333
|
+
normalizedName = normalizeLocale(name);
|
|
6334
|
+
if (hasOwnProp(locales, normalizedName)) {
|
|
6335
|
+
return locales[normalizedName];
|
|
6336
|
+
}
|
|
6337
|
+
|
|
6144
6338
|
// TODO: Find a better way to register and load all the locales in Node
|
|
6145
6339
|
if (
|
|
6146
|
-
locales[name] === undefined &&
|
|
6147
|
-
'object' !== 'undefined' &&
|
|
6148
6340
|
module &&
|
|
6149
6341
|
module.exports &&
|
|
6150
|
-
isLocaleNameSane(
|
|
6342
|
+
isLocaleNameSane(normalizedName)
|
|
6151
6343
|
) {
|
|
6152
6344
|
try {
|
|
6153
6345
|
oldLocale = globalLocale._abbr;
|
|
6154
6346
|
aliasedRequire = commonjsRequire;
|
|
6155
|
-
aliasedRequire('./locale/' +
|
|
6347
|
+
aliasedRequire('./locale/' + normalizedName);
|
|
6156
6348
|
getSetGlobalLocale(oldLocale);
|
|
6157
6349
|
} catch (e) {
|
|
6158
6350
|
// mark as not found to avoid repeating expensive file require call causing high CPU
|
|
6159
6351
|
// when trying to find en-US, en_US, en-us for every format call
|
|
6160
|
-
locales[
|
|
6352
|
+
locales[normalizedName] = null; // null means not found
|
|
6161
6353
|
}
|
|
6162
6354
|
}
|
|
6163
|
-
|
|
6355
|
+
if (hasOwnProp(locales, normalizedName)) {
|
|
6356
|
+
return locales[normalizedName];
|
|
6357
|
+
}
|
|
6164
6358
|
}
|
|
6165
6359
|
|
|
6166
6360
|
// This function will load locale and then set the global locale. If
|
|
@@ -6246,17 +6440,20 @@ var moment$1 = {exports: {}};
|
|
|
6246
6440
|
}
|
|
6247
6441
|
|
|
6248
6442
|
function updateLocale(name, config) {
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
parentConfig = baseConfig;
|
|
6443
|
+
var locale,
|
|
6444
|
+
tmpLocale = loadLocale(name),
|
|
6445
|
+
parentConfig = baseConfig;
|
|
6253
6446
|
|
|
6447
|
+
if (tmpLocale != null) {
|
|
6448
|
+
name = tmpLocale._abbr;
|
|
6449
|
+
}
|
|
6450
|
+
|
|
6451
|
+
if (config != null) {
|
|
6254
6452
|
if (locales[name] != null && locales[name].parentLocale != null) {
|
|
6255
6453
|
// Update existing child locale in-place to avoid memory-leaks
|
|
6256
6454
|
locales[name].set(mergeConfigs(locales[name]._config, config));
|
|
6257
6455
|
} else {
|
|
6258
6456
|
// MERGE
|
|
6259
|
-
tmpLocale = loadLocale(name);
|
|
6260
6457
|
if (tmpLocale != null) {
|
|
6261
6458
|
parentConfig = tmpLocale._config;
|
|
6262
6459
|
}
|
|
@@ -6327,21 +6524,21 @@ var moment$1 = {exports: {}};
|
|
|
6327
6524
|
a[MONTH] < 0 || a[MONTH] > 11
|
|
6328
6525
|
? MONTH
|
|
6329
6526
|
: a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6527
|
+
? DATE
|
|
6528
|
+
: a[HOUR] < 0 ||
|
|
6529
|
+
a[HOUR] > 24 ||
|
|
6530
|
+
(a[HOUR] === 24 &&
|
|
6531
|
+
(a[MINUTE] !== 0 ||
|
|
6532
|
+
a[SECOND] !== 0 ||
|
|
6533
|
+
a[MILLISECOND] !== 0))
|
|
6534
|
+
? HOUR
|
|
6535
|
+
: a[MINUTE] < 0 || a[MINUTE] > 59
|
|
6536
|
+
? MINUTE
|
|
6537
|
+
: a[SECOND] < 0 || a[SECOND] > 59
|
|
6538
|
+
? SECOND
|
|
6539
|
+
: a[MILLISECOND] < 0 || a[MILLISECOND] > 999
|
|
6540
|
+
? MILLISECOND
|
|
6541
|
+
: -1;
|
|
6345
6542
|
|
|
6346
6543
|
if (
|
|
6347
6544
|
getParsingFlags(m)._overflowDayOfYear &&
|
|
@@ -6624,9 +6821,46 @@ var moment$1 = {exports: {}};
|
|
|
6624
6821
|
return c;
|
|
6625
6822
|
}
|
|
6626
6823
|
|
|
6627
|
-
function currentDateArray(config) {
|
|
6824
|
+
function currentDateArray(config, now, forWeek) {
|
|
6825
|
+
var hadWeekContext = Object.prototype.hasOwnProperty.call(
|
|
6826
|
+
config,
|
|
6827
|
+
'_isDefaultDatePartsForWeek'
|
|
6828
|
+
),
|
|
6829
|
+
weekContext = config._isDefaultDatePartsForWeek;
|
|
6830
|
+
|
|
6628
6831
|
// hooks is actually the exported moment object
|
|
6629
|
-
|
|
6832
|
+
config._isDefaultDatePartsForWeek = !!forWeek;
|
|
6833
|
+
try {
|
|
6834
|
+
return hooks._getDefaultDateParts(config, now, forWeek);
|
|
6835
|
+
} finally {
|
|
6836
|
+
if (hadWeekContext) {
|
|
6837
|
+
config._isDefaultDatePartsForWeek = weekContext;
|
|
6838
|
+
} else {
|
|
6839
|
+
delete config._isDefaultDatePartsForWeek;
|
|
6840
|
+
}
|
|
6841
|
+
}
|
|
6842
|
+
}
|
|
6843
|
+
|
|
6844
|
+
function currentDateNow(config) {
|
|
6845
|
+
var now = config._defaultDatePartsNow;
|
|
6846
|
+
|
|
6847
|
+
if (!now) {
|
|
6848
|
+
return hooks.now();
|
|
6849
|
+
}
|
|
6850
|
+
if (!now.hasValue) {
|
|
6851
|
+
now.value = hooks.now();
|
|
6852
|
+
now.hasValue = true;
|
|
6853
|
+
}
|
|
6854
|
+
return now.value;
|
|
6855
|
+
}
|
|
6856
|
+
|
|
6857
|
+
// Internal hook for extensions that supply omitted calendar fields.
|
|
6858
|
+
function getDefaultDateParts(config, now, forWeek) {
|
|
6859
|
+
var useWeekDefaults = forWeek || config._isDefaultDatePartsForWeek,
|
|
6860
|
+
nowValue = useWeekDefaults ? createLocal(now) : new Date(now);
|
|
6861
|
+
if (useWeekDefaults) {
|
|
6862
|
+
return [nowValue.year(), nowValue.month(), nowValue.date()];
|
|
6863
|
+
}
|
|
6630
6864
|
if (config._useUTC) {
|
|
6631
6865
|
return [
|
|
6632
6866
|
nowValue.getUTCFullYear(),
|
|
@@ -6637,6 +6871,8 @@ var moment$1 = {exports: {}};
|
|
|
6637
6871
|
return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
|
|
6638
6872
|
}
|
|
6639
6873
|
|
|
6874
|
+
hooks._getDefaultDateParts = getDefaultDateParts;
|
|
6875
|
+
|
|
6640
6876
|
// convert an array to a date.
|
|
6641
6877
|
// the array should mirror the parameters below
|
|
6642
6878
|
// note: all values past the year are optional and will default to the lowest possible value.
|
|
@@ -6645,24 +6881,34 @@ var moment$1 = {exports: {}};
|
|
|
6645
6881
|
var i,
|
|
6646
6882
|
date,
|
|
6647
6883
|
input = [],
|
|
6884
|
+
now,
|
|
6648
6885
|
currentDate,
|
|
6649
6886
|
expectedWeekday,
|
|
6650
|
-
yearToUse
|
|
6887
|
+
yearToUse,
|
|
6888
|
+
dateIsDefaulted;
|
|
6651
6889
|
|
|
6652
6890
|
if (config._d) {
|
|
6653
6891
|
return;
|
|
6654
6892
|
}
|
|
6655
6893
|
|
|
6656
|
-
|
|
6894
|
+
if (
|
|
6895
|
+
config._a[YEAR] == null ||
|
|
6896
|
+
config._a[MONTH] == null ||
|
|
6897
|
+
config._a[DATE] == null
|
|
6898
|
+
) {
|
|
6899
|
+
now = currentDateNow(config);
|
|
6900
|
+
currentDate = currentDateArray(config, now);
|
|
6901
|
+
}
|
|
6657
6902
|
|
|
6658
6903
|
//compute day of the year from weeks and weekdays
|
|
6659
6904
|
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
|
|
6660
|
-
dayOfYearFromWeekInfo(config);
|
|
6905
|
+
dayOfYearFromWeekInfo(config, currentDateArray(config, now, true));
|
|
6661
6906
|
}
|
|
6662
6907
|
|
|
6663
6908
|
//if the day of the year is set, figure out what it is
|
|
6664
6909
|
if (config._dayOfYear != null) {
|
|
6665
|
-
yearToUse =
|
|
6910
|
+
yearToUse =
|
|
6911
|
+
config._a[YEAR] != null ? config._a[YEAR] : currentDate[YEAR];
|
|
6666
6912
|
|
|
6667
6913
|
if (
|
|
6668
6914
|
config._dayOfYear > daysInYear(yearToUse) ||
|
|
@@ -6676,6 +6922,11 @@ var moment$1 = {exports: {}};
|
|
|
6676
6922
|
config._a[DATE] = date.getUTCDate();
|
|
6677
6923
|
}
|
|
6678
6924
|
|
|
6925
|
+
dateIsDefaulted =
|
|
6926
|
+
config._a[YEAR] == null ||
|
|
6927
|
+
config._a[MONTH] == null ||
|
|
6928
|
+
config._a[DATE] == null;
|
|
6929
|
+
|
|
6679
6930
|
// Default to current date.
|
|
6680
6931
|
// * if no year, month, day of month are given, default to today
|
|
6681
6932
|
// * if day of month is given, default month and year
|
|
@@ -6724,13 +6975,14 @@ var moment$1 = {exports: {}};
|
|
|
6724
6975
|
if (
|
|
6725
6976
|
config._w &&
|
|
6726
6977
|
typeof config._w.d !== 'undefined' &&
|
|
6978
|
+
!dateIsDefaulted &&
|
|
6727
6979
|
config._w.d !== expectedWeekday
|
|
6728
6980
|
) {
|
|
6729
6981
|
getParsingFlags(config).weekdayMismatch = true;
|
|
6730
6982
|
}
|
|
6731
6983
|
}
|
|
6732
6984
|
|
|
6733
|
-
function dayOfYearFromWeekInfo(config) {
|
|
6985
|
+
function dayOfYearFromWeekInfo(config, currentDate) {
|
|
6734
6986
|
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
|
|
6735
6987
|
|
|
6736
6988
|
w = config._w;
|
|
@@ -6745,7 +6997,13 @@ var moment$1 = {exports: {}};
|
|
|
6745
6997
|
weekYear = defaults(
|
|
6746
6998
|
w.GG,
|
|
6747
6999
|
config._a[YEAR],
|
|
6748
|
-
|
|
7000
|
+
weekOfYearFromDate(
|
|
7001
|
+
currentDate[YEAR],
|
|
7002
|
+
currentDate[MONTH],
|
|
7003
|
+
currentDate[DATE],
|
|
7004
|
+
1,
|
|
7005
|
+
4
|
|
7006
|
+
).year
|
|
6749
7007
|
);
|
|
6750
7008
|
week = defaults(w.W, 1);
|
|
6751
7009
|
weekday = defaults(w.E, 1);
|
|
@@ -6756,7 +7014,13 @@ var moment$1 = {exports: {}};
|
|
|
6756
7014
|
dow = config._locale._week.dow;
|
|
6757
7015
|
doy = config._locale._week.doy;
|
|
6758
7016
|
|
|
6759
|
-
curWeek =
|
|
7017
|
+
curWeek = weekOfYearFromDate(
|
|
7018
|
+
currentDate[YEAR],
|
|
7019
|
+
currentDate[MONTH],
|
|
7020
|
+
currentDate[DATE],
|
|
7021
|
+
dow,
|
|
7022
|
+
doy
|
|
7023
|
+
);
|
|
6760
7024
|
|
|
6761
7025
|
weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
|
|
6762
7026
|
|
|
@@ -6922,6 +7186,7 @@ var moment$1 = {exports: {}};
|
|
|
6922
7186
|
currentScore,
|
|
6923
7187
|
validFormatFound,
|
|
6924
7188
|
bestFormatIsValid = false,
|
|
7189
|
+
defaultDatePartsNow = {},
|
|
6925
7190
|
configfLen = config._f.length;
|
|
6926
7191
|
|
|
6927
7192
|
if (configfLen === 0) {
|
|
@@ -6937,10 +7202,11 @@ var moment$1 = {exports: {}};
|
|
|
6937
7202
|
if (config._useUTC != null) {
|
|
6938
7203
|
tempConfig._useUTC = config._useUTC;
|
|
6939
7204
|
}
|
|
7205
|
+
tempConfig._defaultDatePartsNow = defaultDatePartsNow;
|
|
6940
7206
|
tempConfig._f = config._f[i];
|
|
6941
7207
|
configFromStringAndFormat(tempConfig);
|
|
6942
7208
|
|
|
6943
|
-
if (isValid(tempConfig)) {
|
|
7209
|
+
if (isValid$2(tempConfig)) {
|
|
6944
7210
|
validFormatFound = true;
|
|
6945
7211
|
}
|
|
6946
7212
|
|
|
@@ -7010,7 +7276,7 @@ var moment$1 = {exports: {}};
|
|
|
7010
7276
|
config._locale = config._locale || getLocale(config._l);
|
|
7011
7277
|
|
|
7012
7278
|
if (input === null || (format === undefined && input === '')) {
|
|
7013
|
-
return createInvalid({ nullInput: true });
|
|
7279
|
+
return createInvalid$1({ nullInput: true });
|
|
7014
7280
|
}
|
|
7015
7281
|
|
|
7016
7282
|
if (typeof input === 'string') {
|
|
@@ -7029,7 +7295,7 @@ var moment$1 = {exports: {}};
|
|
|
7029
7295
|
configFromInput(config);
|
|
7030
7296
|
}
|
|
7031
7297
|
|
|
7032
|
-
if (!isValid(config)) {
|
|
7298
|
+
if (!isValid$2(config)) {
|
|
7033
7299
|
config._d = null;
|
|
7034
7300
|
}
|
|
7035
7301
|
|
|
@@ -7101,7 +7367,7 @@ var moment$1 = {exports: {}};
|
|
|
7101
7367
|
if (this.isValid() && other.isValid()) {
|
|
7102
7368
|
return other < this ? this : other;
|
|
7103
7369
|
} else {
|
|
7104
|
-
return createInvalid();
|
|
7370
|
+
return createInvalid$1();
|
|
7105
7371
|
}
|
|
7106
7372
|
}
|
|
7107
7373
|
),
|
|
@@ -7112,7 +7378,7 @@ var moment$1 = {exports: {}};
|
|
|
7112
7378
|
if (this.isValid() && other.isValid()) {
|
|
7113
7379
|
return other > this ? this : other;
|
|
7114
7380
|
} else {
|
|
7115
|
-
return createInvalid();
|
|
7381
|
+
return createInvalid$1();
|
|
7116
7382
|
}
|
|
7117
7383
|
}
|
|
7118
7384
|
);
|
|
@@ -7130,9 +7396,20 @@ var moment$1 = {exports: {}};
|
|
|
7130
7396
|
if (!moments.length) {
|
|
7131
7397
|
return createLocal();
|
|
7132
7398
|
}
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7399
|
+
for (i = 0; i < moments.length; ++i) {
|
|
7400
|
+
if (isMoment(moments[i])) {
|
|
7401
|
+
res = moments[i];
|
|
7402
|
+
break;
|
|
7403
|
+
}
|
|
7404
|
+
}
|
|
7405
|
+
if (!res) {
|
|
7406
|
+
return createInvalid$1();
|
|
7407
|
+
}
|
|
7408
|
+
for (++i; i < moments.length; ++i) {
|
|
7409
|
+
if (
|
|
7410
|
+
isMoment(moments[i]) &&
|
|
7411
|
+
(!moments[i].isValid() || moments[i][fn](res))
|
|
7412
|
+
) {
|
|
7136
7413
|
res = moments[i];
|
|
7137
7414
|
}
|
|
7138
7415
|
}
|
|
@@ -7203,7 +7480,7 @@ var moment$1 = {exports: {}};
|
|
|
7203
7480
|
return this._isValid;
|
|
7204
7481
|
}
|
|
7205
7482
|
|
|
7206
|
-
function createInvalid
|
|
7483
|
+
function createInvalid() {
|
|
7207
7484
|
return createDuration(NaN);
|
|
7208
7485
|
}
|
|
7209
7486
|
|
|
@@ -7262,8 +7539,7 @@ var moment$1 = {exports: {}};
|
|
|
7262
7539
|
i;
|
|
7263
7540
|
for (i = 0; i < len; i++) {
|
|
7264
7541
|
if (
|
|
7265
|
-
(
|
|
7266
|
-
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
|
|
7542
|
+
(toInt(array1[i]) !== toInt(array2[i]))
|
|
7267
7543
|
) {
|
|
7268
7544
|
diffs++;
|
|
7269
7545
|
}
|
|
@@ -7298,8 +7574,12 @@ var moment$1 = {exports: {}};
|
|
|
7298
7574
|
addRegexToken('Z', matchShortOffset);
|
|
7299
7575
|
addRegexToken('ZZ', matchShortOffset);
|
|
7300
7576
|
addParseToken(['Z', 'ZZ'], function (input, array, config) {
|
|
7577
|
+
var offset = offsetFromString(matchShortOffset, input);
|
|
7301
7578
|
config._useUTC = true;
|
|
7302
|
-
config._tzm =
|
|
7579
|
+
config._tzm = offset;
|
|
7580
|
+
if (offset === null) {
|
|
7581
|
+
getParsingFlags(config).invalidOffset = input;
|
|
7582
|
+
}
|
|
7303
7583
|
});
|
|
7304
7584
|
|
|
7305
7585
|
// HELPERS
|
|
@@ -7323,6 +7603,13 @@ var moment$1 = {exports: {}};
|
|
|
7323
7603
|
parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
|
|
7324
7604
|
minutes = +(parts[1] * 60) + toInt(parts[2]);
|
|
7325
7605
|
|
|
7606
|
+
if (
|
|
7607
|
+
toInt(parts[2]) > 59 ||
|
|
7608
|
+
(parts[0] === '+' ? minutes > 14 * 60 : minutes > 12 * 60)
|
|
7609
|
+
) {
|
|
7610
|
+
return null;
|
|
7611
|
+
}
|
|
7612
|
+
|
|
7326
7613
|
return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
|
|
7327
7614
|
}
|
|
7328
7615
|
|
|
@@ -7393,7 +7680,7 @@ var moment$1 = {exports: {}};
|
|
|
7393
7680
|
}
|
|
7394
7681
|
if (offset !== input) {
|
|
7395
7682
|
if (!keepLocalTime || this._changeInProgress) {
|
|
7396
|
-
addSubtract(
|
|
7683
|
+
addSubtract$1(
|
|
7397
7684
|
this,
|
|
7398
7685
|
createDuration(input - offset, 'm'),
|
|
7399
7686
|
1,
|
|
@@ -7586,7 +7873,7 @@ var moment$1 = {exports: {}};
|
|
|
7586
7873
|
}
|
|
7587
7874
|
|
|
7588
7875
|
createDuration.fn = Duration.prototype;
|
|
7589
|
-
createDuration.invalid = createInvalid
|
|
7876
|
+
createDuration.invalid = createInvalid;
|
|
7590
7877
|
|
|
7591
7878
|
function parseIso(inp, sign) {
|
|
7592
7879
|
// We'd normally use ~~inp for this, but unfortunately it also
|
|
@@ -7650,12 +7937,12 @@ var moment$1 = {exports: {}};
|
|
|
7650
7937
|
}
|
|
7651
7938
|
|
|
7652
7939
|
dur = createDuration(val, period);
|
|
7653
|
-
addSubtract(this, dur, direction);
|
|
7940
|
+
addSubtract$1(this, dur, direction);
|
|
7654
7941
|
return this;
|
|
7655
7942
|
};
|
|
7656
7943
|
}
|
|
7657
7944
|
|
|
7658
|
-
function addSubtract(mom, duration, isAdding, updateOffset) {
|
|
7945
|
+
function addSubtract$1(mom, duration, isAdding, updateOffset) {
|
|
7659
7946
|
var milliseconds = duration._milliseconds,
|
|
7660
7947
|
days = absRound(duration._days),
|
|
7661
7948
|
months = absRound(duration._months);
|
|
@@ -7668,10 +7955,10 @@ var moment$1 = {exports: {}};
|
|
|
7668
7955
|
updateOffset = updateOffset == null ? true : updateOffset;
|
|
7669
7956
|
|
|
7670
7957
|
if (months) {
|
|
7671
|
-
setMonth(mom, get(mom, 'Month') + months * isAdding);
|
|
7958
|
+
setMonth(mom, get$2(mom, 'Month') + months * isAdding);
|
|
7672
7959
|
}
|
|
7673
7960
|
if (days) {
|
|
7674
|
-
set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
|
|
7961
|
+
set$1(mom, 'Date', get$2(mom, 'Date') + days * isAdding);
|
|
7675
7962
|
}
|
|
7676
7963
|
if (milliseconds) {
|
|
7677
7964
|
mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
|
|
@@ -7681,8 +7968,8 @@ var moment$1 = {exports: {}};
|
|
|
7681
7968
|
}
|
|
7682
7969
|
}
|
|
7683
7970
|
|
|
7684
|
-
var add = createAdder(1, 'add'),
|
|
7685
|
-
subtract = createAdder(-1, 'subtract');
|
|
7971
|
+
var add$1 = createAdder(1, 'add'),
|
|
7972
|
+
subtract$1 = createAdder(-1, 'subtract');
|
|
7686
7973
|
|
|
7687
7974
|
function isString(input) {
|
|
7688
7975
|
return typeof input === 'string' || input instanceof String;
|
|
@@ -7782,19 +8069,19 @@ var moment$1 = {exports: {}};
|
|
|
7782
8069
|
return diff < -6
|
|
7783
8070
|
? 'sameElse'
|
|
7784
8071
|
: diff < -1
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
}
|
|
7796
|
-
|
|
7797
|
-
function calendar
|
|
8072
|
+
? 'lastWeek'
|
|
8073
|
+
: diff < 0
|
|
8074
|
+
? 'lastDay'
|
|
8075
|
+
: diff < 1
|
|
8076
|
+
? 'sameDay'
|
|
8077
|
+
: diff < 2
|
|
8078
|
+
? 'nextDay'
|
|
8079
|
+
: diff < 7
|
|
8080
|
+
? 'nextWeek'
|
|
8081
|
+
: 'sameElse';
|
|
8082
|
+
}
|
|
8083
|
+
|
|
8084
|
+
function calendar(time, formats) {
|
|
7798
8085
|
// Support for single parameter, formats only overload to the calendar function
|
|
7799
8086
|
if (arguments.length === 1) {
|
|
7800
8087
|
if (!arguments[0]) {
|
|
@@ -7824,7 +8111,7 @@ var moment$1 = {exports: {}};
|
|
|
7824
8111
|
);
|
|
7825
8112
|
}
|
|
7826
8113
|
|
|
7827
|
-
function clone() {
|
|
8114
|
+
function clone$1() {
|
|
7828
8115
|
return new Moment(this);
|
|
7829
8116
|
}
|
|
7830
8117
|
|
|
@@ -7980,7 +8267,7 @@ var moment$1 = {exports: {}};
|
|
|
7980
8267
|
return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
|
|
7981
8268
|
}
|
|
7982
8269
|
|
|
7983
|
-
function toISOString(keepOffset) {
|
|
8270
|
+
function toISOString$1(keepOffset) {
|
|
7984
8271
|
if (!this.isValid()) {
|
|
7985
8272
|
return null;
|
|
7986
8273
|
}
|
|
@@ -8120,7 +8407,7 @@ var moment$1 = {exports: {}};
|
|
|
8120
8407
|
MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
|
|
8121
8408
|
|
|
8122
8409
|
// actual modulo - handles negative numbers (for dates before 1970):
|
|
8123
|
-
function mod
|
|
8410
|
+
function mod(dividend, divisor) {
|
|
8124
8411
|
return ((dividend % divisor) + divisor) % divisor;
|
|
8125
8412
|
}
|
|
8126
8413
|
|
|
@@ -8187,18 +8474,18 @@ var moment$1 = {exports: {}};
|
|
|
8187
8474
|
break;
|
|
8188
8475
|
case 'hour':
|
|
8189
8476
|
time = this._d.valueOf();
|
|
8190
|
-
time -= mod
|
|
8477
|
+
time -= mod(
|
|
8191
8478
|
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
|
|
8192
8479
|
MS_PER_HOUR
|
|
8193
8480
|
);
|
|
8194
8481
|
break;
|
|
8195
8482
|
case 'minute':
|
|
8196
8483
|
time = this._d.valueOf();
|
|
8197
|
-
time -= mod
|
|
8484
|
+
time -= mod(time, MS_PER_MINUTE);
|
|
8198
8485
|
break;
|
|
8199
8486
|
case 'second':
|
|
8200
8487
|
time = this._d.valueOf();
|
|
8201
|
-
time -= mod
|
|
8488
|
+
time -= mod(time, MS_PER_SECOND);
|
|
8202
8489
|
break;
|
|
8203
8490
|
}
|
|
8204
8491
|
|
|
@@ -8255,7 +8542,7 @@ var moment$1 = {exports: {}};
|
|
|
8255
8542
|
time = this._d.valueOf();
|
|
8256
8543
|
time +=
|
|
8257
8544
|
MS_PER_HOUR -
|
|
8258
|
-
mod
|
|
8545
|
+
mod(
|
|
8259
8546
|
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
|
|
8260
8547
|
MS_PER_HOUR
|
|
8261
8548
|
) -
|
|
@@ -8263,11 +8550,11 @@ var moment$1 = {exports: {}};
|
|
|
8263
8550
|
break;
|
|
8264
8551
|
case 'minute':
|
|
8265
8552
|
time = this._d.valueOf();
|
|
8266
|
-
time += MS_PER_MINUTE - mod
|
|
8553
|
+
time += MS_PER_MINUTE - mod(time, MS_PER_MINUTE) - 1;
|
|
8267
8554
|
break;
|
|
8268
8555
|
case 'second':
|
|
8269
8556
|
time = this._d.valueOf();
|
|
8270
|
-
time += MS_PER_SECOND - mod
|
|
8557
|
+
time += MS_PER_SECOND - mod(time, MS_PER_SECOND) - 1;
|
|
8271
8558
|
break;
|
|
8272
8559
|
}
|
|
8273
8560
|
|
|
@@ -8276,7 +8563,7 @@ var moment$1 = {exports: {}};
|
|
|
8276
8563
|
return this;
|
|
8277
8564
|
}
|
|
8278
8565
|
|
|
8279
|
-
function valueOf() {
|
|
8566
|
+
function valueOf$1() {
|
|
8280
8567
|
return this._d.valueOf() - (this._offset || 0) * 60000;
|
|
8281
8568
|
}
|
|
8282
8569
|
|
|
@@ -8319,8 +8606,8 @@ var moment$1 = {exports: {}};
|
|
|
8319
8606
|
return this.isValid() ? this.toISOString() : null;
|
|
8320
8607
|
}
|
|
8321
8608
|
|
|
8322
|
-
function isValid
|
|
8323
|
-
return isValid(this);
|
|
8609
|
+
function isValid() {
|
|
8610
|
+
return isValid$2(this);
|
|
8324
8611
|
}
|
|
8325
8612
|
|
|
8326
8613
|
function parsingFlags() {
|
|
@@ -8461,7 +8748,7 @@ var moment$1 = {exports: {}};
|
|
|
8461
8748
|
}
|
|
8462
8749
|
|
|
8463
8750
|
function localeErasConvertYear(era, year) {
|
|
8464
|
-
var dir = era.since <= era.until ?
|
|
8751
|
+
var dir = era.since <= era.until ? 1 : -1;
|
|
8465
8752
|
if (year === undefined) {
|
|
8466
8753
|
return hooks(era.since).year();
|
|
8467
8754
|
} else {
|
|
@@ -8536,7 +8823,7 @@ var moment$1 = {exports: {}};
|
|
|
8536
8823
|
val,
|
|
8537
8824
|
eras = this.localeData().eras();
|
|
8538
8825
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
8539
|
-
dir = eras[i].since <= eras[i].until ?
|
|
8826
|
+
dir = eras[i].since <= eras[i].until ? 1 : -1;
|
|
8540
8827
|
|
|
8541
8828
|
// truncate time
|
|
8542
8829
|
val = this.clone().startOf('day').valueOf();
|
|
@@ -8599,16 +8886,22 @@ var moment$1 = {exports: {}};
|
|
|
8599
8886
|
mixedPieces = [],
|
|
8600
8887
|
i,
|
|
8601
8888
|
l,
|
|
8889
|
+
erasName,
|
|
8890
|
+
erasAbbr,
|
|
8891
|
+
erasNarrow,
|
|
8602
8892
|
eras = this.eras();
|
|
8603
8893
|
|
|
8604
8894
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8895
|
+
erasName = regexEscape(eras[i].name);
|
|
8896
|
+
erasAbbr = regexEscape(eras[i].abbr);
|
|
8897
|
+
erasNarrow = regexEscape(eras[i].narrow);
|
|
8608
8898
|
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8899
|
+
namePieces.push(erasName);
|
|
8900
|
+
abbrPieces.push(erasAbbr);
|
|
8901
|
+
narrowPieces.push(erasNarrow);
|
|
8902
|
+
mixedPieces.push(erasName);
|
|
8903
|
+
mixedPieces.push(erasAbbr);
|
|
8904
|
+
mixedPieces.push(erasNarrow);
|
|
8612
8905
|
}
|
|
8613
8906
|
|
|
8614
8907
|
this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
|
|
@@ -8641,14 +8934,6 @@ var moment$1 = {exports: {}};
|
|
|
8641
8934
|
|
|
8642
8935
|
// ALIASES
|
|
8643
8936
|
|
|
8644
|
-
addUnitAlias('weekYear', 'gg');
|
|
8645
|
-
addUnitAlias('isoWeekYear', 'GG');
|
|
8646
|
-
|
|
8647
|
-
// PRIORITY
|
|
8648
|
-
|
|
8649
|
-
addUnitPriority('weekYear', 1);
|
|
8650
|
-
addUnitPriority('isoWeekYear', 1);
|
|
8651
|
-
|
|
8652
8937
|
// PARSING
|
|
8653
8938
|
|
|
8654
8939
|
addRegexToken('G', matchSigned);
|
|
@@ -8678,7 +8963,7 @@ var moment$1 = {exports: {}};
|
|
|
8678
8963
|
this,
|
|
8679
8964
|
input,
|
|
8680
8965
|
this.week(),
|
|
8681
|
-
this.weekday(),
|
|
8966
|
+
this.weekday() + this.localeData()._week.dow,
|
|
8682
8967
|
this.localeData()._week.dow,
|
|
8683
8968
|
this.localeData()._week.doy
|
|
8684
8969
|
);
|
|
@@ -8740,14 +9025,6 @@ var moment$1 = {exports: {}};
|
|
|
8740
9025
|
|
|
8741
9026
|
addFormatToken('Q', 0, 'Qo', 'quarter');
|
|
8742
9027
|
|
|
8743
|
-
// ALIASES
|
|
8744
|
-
|
|
8745
|
-
addUnitAlias('quarter', 'Q');
|
|
8746
|
-
|
|
8747
|
-
// PRIORITY
|
|
8748
|
-
|
|
8749
|
-
addUnitPriority('quarter', 7);
|
|
8750
|
-
|
|
8751
9028
|
// PARSING
|
|
8752
9029
|
|
|
8753
9030
|
addRegexToken('Q', match1);
|
|
@@ -8767,16 +9044,9 @@ var moment$1 = {exports: {}};
|
|
|
8767
9044
|
|
|
8768
9045
|
addFormatToken('D', ['DD', 2], 'Do', 'date');
|
|
8769
9046
|
|
|
8770
|
-
// ALIASES
|
|
8771
|
-
|
|
8772
|
-
addUnitAlias('date', 'D');
|
|
8773
|
-
|
|
8774
|
-
// PRIORITY
|
|
8775
|
-
addUnitPriority('date', 9);
|
|
8776
|
-
|
|
8777
9047
|
// PARSING
|
|
8778
9048
|
|
|
8779
|
-
addRegexToken('D', match1to2);
|
|
9049
|
+
addRegexToken('D', match1to2, match1to2NoLeadingZero);
|
|
8780
9050
|
addRegexToken('DD', match1to2, match2);
|
|
8781
9051
|
addRegexToken('Do', function (isStrict, locale) {
|
|
8782
9052
|
// TODO: Remove "ordinalParse" fallback in next major release.
|
|
@@ -8798,13 +9068,6 @@ var moment$1 = {exports: {}};
|
|
|
8798
9068
|
|
|
8799
9069
|
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
|
|
8800
9070
|
|
|
8801
|
-
// ALIASES
|
|
8802
|
-
|
|
8803
|
-
addUnitAlias('dayOfYear', 'DDD');
|
|
8804
|
-
|
|
8805
|
-
// PRIORITY
|
|
8806
|
-
addUnitPriority('dayOfYear', 4);
|
|
8807
|
-
|
|
8808
9071
|
// PARSING
|
|
8809
9072
|
|
|
8810
9073
|
addRegexToken('DDD', match1to3);
|
|
@@ -8829,17 +9092,9 @@ var moment$1 = {exports: {}};
|
|
|
8829
9092
|
|
|
8830
9093
|
addFormatToken('m', ['mm', 2], 0, 'minute');
|
|
8831
9094
|
|
|
8832
|
-
// ALIASES
|
|
8833
|
-
|
|
8834
|
-
addUnitAlias('minute', 'm');
|
|
8835
|
-
|
|
8836
|
-
// PRIORITY
|
|
8837
|
-
|
|
8838
|
-
addUnitPriority('minute', 14);
|
|
8839
|
-
|
|
8840
9095
|
// PARSING
|
|
8841
9096
|
|
|
8842
|
-
addRegexToken('m', match1to2);
|
|
9097
|
+
addRegexToken('m', match1to2, match1to2HasZero);
|
|
8843
9098
|
addRegexToken('mm', match1to2, match2);
|
|
8844
9099
|
addParseToken(['m', 'mm'], MINUTE);
|
|
8845
9100
|
|
|
@@ -8851,17 +9106,9 @@ var moment$1 = {exports: {}};
|
|
|
8851
9106
|
|
|
8852
9107
|
addFormatToken('s', ['ss', 2], 0, 'second');
|
|
8853
9108
|
|
|
8854
|
-
// ALIASES
|
|
8855
|
-
|
|
8856
|
-
addUnitAlias('second', 's');
|
|
8857
|
-
|
|
8858
|
-
// PRIORITY
|
|
8859
|
-
|
|
8860
|
-
addUnitPriority('second', 15);
|
|
8861
|
-
|
|
8862
9109
|
// PARSING
|
|
8863
9110
|
|
|
8864
|
-
addRegexToken('s', match1to2);
|
|
9111
|
+
addRegexToken('s', match1to2, match1to2HasZero);
|
|
8865
9112
|
addRegexToken('ss', match1to2, match2);
|
|
8866
9113
|
addParseToken(['s', 'ss'], SECOND);
|
|
8867
9114
|
|
|
@@ -8899,14 +9146,6 @@ var moment$1 = {exports: {}};
|
|
|
8899
9146
|
return this.millisecond() * 1000000;
|
|
8900
9147
|
});
|
|
8901
9148
|
|
|
8902
|
-
// ALIASES
|
|
8903
|
-
|
|
8904
|
-
addUnitAlias('millisecond', 'ms');
|
|
8905
|
-
|
|
8906
|
-
// PRIORITY
|
|
8907
|
-
|
|
8908
|
-
addUnitPriority('millisecond', 16);
|
|
8909
|
-
|
|
8910
9149
|
// PARSING
|
|
8911
9150
|
|
|
8912
9151
|
addRegexToken('S', match1to3, match1);
|
|
@@ -8943,106 +9182,106 @@ var moment$1 = {exports: {}};
|
|
|
8943
9182
|
return this._isUTC ? 'Coordinated Universal Time' : '';
|
|
8944
9183
|
}
|
|
8945
9184
|
|
|
8946
|
-
var proto = Moment.prototype;
|
|
9185
|
+
var proto$2 = Moment.prototype;
|
|
8947
9186
|
|
|
8948
|
-
proto.add = add;
|
|
8949
|
-
proto.calendar = calendar
|
|
8950
|
-
proto.clone = clone;
|
|
8951
|
-
proto.diff = diff;
|
|
8952
|
-
proto.endOf = endOf;
|
|
8953
|
-
proto.format = format;
|
|
8954
|
-
proto.from = from;
|
|
8955
|
-
proto.fromNow = fromNow;
|
|
8956
|
-
proto.to = to;
|
|
8957
|
-
proto.toNow = toNow;
|
|
8958
|
-
proto.get = stringGet;
|
|
8959
|
-
proto.invalidAt = invalidAt;
|
|
8960
|
-
proto.isAfter = isAfter;
|
|
8961
|
-
proto.isBefore = isBefore;
|
|
8962
|
-
proto.isBetween = isBetween;
|
|
8963
|
-
proto.isSame = isSame;
|
|
8964
|
-
proto.isSameOrAfter = isSameOrAfter;
|
|
8965
|
-
proto.isSameOrBefore = isSameOrBefore;
|
|
8966
|
-
proto.isValid = isValid
|
|
8967
|
-
proto.lang = lang;
|
|
8968
|
-
proto.locale = locale;
|
|
8969
|
-
proto.localeData = localeData;
|
|
8970
|
-
proto.max = prototypeMax;
|
|
8971
|
-
proto.min = prototypeMin;
|
|
8972
|
-
proto.parsingFlags = parsingFlags;
|
|
8973
|
-
proto.set = stringSet;
|
|
8974
|
-
proto.startOf = startOf;
|
|
8975
|
-
proto.subtract = subtract;
|
|
8976
|
-
proto.toArray = toArray;
|
|
8977
|
-
proto.toObject = toObject;
|
|
8978
|
-
proto.toDate = toDate;
|
|
8979
|
-
proto.toISOString = toISOString;
|
|
8980
|
-
proto.inspect = inspect;
|
|
9187
|
+
proto$2.add = add$1;
|
|
9188
|
+
proto$2.calendar = calendar;
|
|
9189
|
+
proto$2.clone = clone$1;
|
|
9190
|
+
proto$2.diff = diff;
|
|
9191
|
+
proto$2.endOf = endOf;
|
|
9192
|
+
proto$2.format = format;
|
|
9193
|
+
proto$2.from = from;
|
|
9194
|
+
proto$2.fromNow = fromNow;
|
|
9195
|
+
proto$2.to = to;
|
|
9196
|
+
proto$2.toNow = toNow;
|
|
9197
|
+
proto$2.get = stringGet;
|
|
9198
|
+
proto$2.invalidAt = invalidAt;
|
|
9199
|
+
proto$2.isAfter = isAfter;
|
|
9200
|
+
proto$2.isBefore = isBefore;
|
|
9201
|
+
proto$2.isBetween = isBetween;
|
|
9202
|
+
proto$2.isSame = isSame;
|
|
9203
|
+
proto$2.isSameOrAfter = isSameOrAfter;
|
|
9204
|
+
proto$2.isSameOrBefore = isSameOrBefore;
|
|
9205
|
+
proto$2.isValid = isValid;
|
|
9206
|
+
proto$2.lang = lang;
|
|
9207
|
+
proto$2.locale = locale;
|
|
9208
|
+
proto$2.localeData = localeData;
|
|
9209
|
+
proto$2.max = prototypeMax;
|
|
9210
|
+
proto$2.min = prototypeMin;
|
|
9211
|
+
proto$2.parsingFlags = parsingFlags;
|
|
9212
|
+
proto$2.set = stringSet;
|
|
9213
|
+
proto$2.startOf = startOf;
|
|
9214
|
+
proto$2.subtract = subtract$1;
|
|
9215
|
+
proto$2.toArray = toArray;
|
|
9216
|
+
proto$2.toObject = toObject;
|
|
9217
|
+
proto$2.toDate = toDate;
|
|
9218
|
+
proto$2.toISOString = toISOString$1;
|
|
9219
|
+
proto$2.inspect = inspect;
|
|
8981
9220
|
if (typeof Symbol !== 'undefined' && Symbol.for != null) {
|
|
8982
|
-
proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
|
|
9221
|
+
proto$2[Symbol.for('nodejs.util.inspect.custom')] = function () {
|
|
8983
9222
|
return 'Moment<' + this.format() + '>';
|
|
8984
9223
|
};
|
|
8985
9224
|
}
|
|
8986
|
-
proto.toJSON = toJSON;
|
|
8987
|
-
proto.toString = toString;
|
|
8988
|
-
proto.unix = unix;
|
|
8989
|
-
proto.valueOf = valueOf;
|
|
8990
|
-
proto.creationData = creationData;
|
|
8991
|
-
proto.eraName = getEraName;
|
|
8992
|
-
proto.eraNarrow = getEraNarrow;
|
|
8993
|
-
proto.eraAbbr = getEraAbbr;
|
|
8994
|
-
proto.eraYear = getEraYear;
|
|
8995
|
-
proto.year = getSetYear;
|
|
8996
|
-
proto.isLeapYear = getIsLeapYear;
|
|
8997
|
-
proto.weekYear = getSetWeekYear;
|
|
8998
|
-
proto.isoWeekYear = getSetISOWeekYear;
|
|
8999
|
-
proto.quarter = proto.quarters = getSetQuarter;
|
|
9000
|
-
proto.month = getSetMonth;
|
|
9001
|
-
proto.daysInMonth = getDaysInMonth;
|
|
9002
|
-
proto.week = proto.weeks = getSetWeek;
|
|
9003
|
-
proto.isoWeek = proto.isoWeeks = getSetISOWeek;
|
|
9004
|
-
proto.weeksInYear = getWeeksInYear;
|
|
9005
|
-
proto.weeksInWeekYear = getWeeksInWeekYear;
|
|
9006
|
-
proto.isoWeeksInYear = getISOWeeksInYear;
|
|
9007
|
-
proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
|
|
9008
|
-
proto.date = getSetDayOfMonth;
|
|
9009
|
-
proto.day = proto.days = getSetDayOfWeek;
|
|
9010
|
-
proto.weekday = getSetLocaleDayOfWeek;
|
|
9011
|
-
proto.isoWeekday = getSetISODayOfWeek;
|
|
9012
|
-
proto.dayOfYear = getSetDayOfYear;
|
|
9013
|
-
proto.hour = proto.hours = getSetHour;
|
|
9014
|
-
proto.minute = proto.minutes = getSetMinute;
|
|
9015
|
-
proto.second = proto.seconds = getSetSecond;
|
|
9016
|
-
proto.millisecond = proto.milliseconds = getSetMillisecond;
|
|
9017
|
-
proto.utcOffset = getSetOffset;
|
|
9018
|
-
proto.utc = setOffsetToUTC;
|
|
9019
|
-
proto.local = setOffsetToLocal;
|
|
9020
|
-
proto.parseZone = setOffsetToParsedOffset;
|
|
9021
|
-
proto.hasAlignedHourOffset = hasAlignedHourOffset;
|
|
9022
|
-
proto.isDST = isDaylightSavingTime;
|
|
9023
|
-
proto.isLocal = isLocal;
|
|
9024
|
-
proto.isUtcOffset = isUtcOffset;
|
|
9025
|
-
proto.isUtc = isUtc;
|
|
9026
|
-
proto.isUTC = isUtc;
|
|
9027
|
-
proto.zoneAbbr = getZoneAbbr;
|
|
9028
|
-
proto.zoneName = getZoneName;
|
|
9029
|
-
proto.dates = deprecate(
|
|
9225
|
+
proto$2.toJSON = toJSON;
|
|
9226
|
+
proto$2.toString = toString;
|
|
9227
|
+
proto$2.unix = unix;
|
|
9228
|
+
proto$2.valueOf = valueOf$1;
|
|
9229
|
+
proto$2.creationData = creationData;
|
|
9230
|
+
proto$2.eraName = getEraName;
|
|
9231
|
+
proto$2.eraNarrow = getEraNarrow;
|
|
9232
|
+
proto$2.eraAbbr = getEraAbbr;
|
|
9233
|
+
proto$2.eraYear = getEraYear;
|
|
9234
|
+
proto$2.year = getSetYear;
|
|
9235
|
+
proto$2.isLeapYear = getIsLeapYear;
|
|
9236
|
+
proto$2.weekYear = getSetWeekYear;
|
|
9237
|
+
proto$2.isoWeekYear = getSetISOWeekYear;
|
|
9238
|
+
proto$2.quarter = proto$2.quarters = getSetQuarter;
|
|
9239
|
+
proto$2.month = getSetMonth;
|
|
9240
|
+
proto$2.daysInMonth = getDaysInMonth;
|
|
9241
|
+
proto$2.week = proto$2.weeks = getSetWeek;
|
|
9242
|
+
proto$2.isoWeek = proto$2.isoWeeks = getSetISOWeek;
|
|
9243
|
+
proto$2.weeksInYear = getWeeksInYear;
|
|
9244
|
+
proto$2.weeksInWeekYear = getWeeksInWeekYear;
|
|
9245
|
+
proto$2.isoWeeksInYear = getISOWeeksInYear;
|
|
9246
|
+
proto$2.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
|
|
9247
|
+
proto$2.date = getSetDayOfMonth;
|
|
9248
|
+
proto$2.day = proto$2.days = getSetDayOfWeek;
|
|
9249
|
+
proto$2.weekday = getSetLocaleDayOfWeek;
|
|
9250
|
+
proto$2.isoWeekday = getSetISODayOfWeek;
|
|
9251
|
+
proto$2.dayOfYear = getSetDayOfYear;
|
|
9252
|
+
proto$2.hour = proto$2.hours = getSetHour;
|
|
9253
|
+
proto$2.minute = proto$2.minutes = getSetMinute;
|
|
9254
|
+
proto$2.second = proto$2.seconds = getSetSecond;
|
|
9255
|
+
proto$2.millisecond = proto$2.milliseconds = getSetMillisecond;
|
|
9256
|
+
proto$2.utcOffset = getSetOffset;
|
|
9257
|
+
proto$2.utc = setOffsetToUTC;
|
|
9258
|
+
proto$2.local = setOffsetToLocal;
|
|
9259
|
+
proto$2.parseZone = setOffsetToParsedOffset;
|
|
9260
|
+
proto$2.hasAlignedHourOffset = hasAlignedHourOffset;
|
|
9261
|
+
proto$2.isDST = isDaylightSavingTime;
|
|
9262
|
+
proto$2.isLocal = isLocal;
|
|
9263
|
+
proto$2.isUtcOffset = isUtcOffset;
|
|
9264
|
+
proto$2.isUtc = isUtc;
|
|
9265
|
+
proto$2.isUTC = isUtc;
|
|
9266
|
+
proto$2.zoneAbbr = getZoneAbbr;
|
|
9267
|
+
proto$2.zoneName = getZoneName;
|
|
9268
|
+
proto$2.dates = deprecate(
|
|
9030
9269
|
'dates accessor is deprecated. Use date instead.',
|
|
9031
9270
|
getSetDayOfMonth
|
|
9032
9271
|
);
|
|
9033
|
-
proto.months = deprecate(
|
|
9272
|
+
proto$2.months = deprecate(
|
|
9034
9273
|
'months accessor is deprecated. Use month instead',
|
|
9035
9274
|
getSetMonth
|
|
9036
9275
|
);
|
|
9037
|
-
proto.years = deprecate(
|
|
9276
|
+
proto$2.years = deprecate(
|
|
9038
9277
|
'years accessor is deprecated. Use year instead',
|
|
9039
9278
|
getSetYear
|
|
9040
9279
|
);
|
|
9041
|
-
proto.zone = deprecate(
|
|
9280
|
+
proto$2.zone = deprecate(
|
|
9042
9281
|
'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
|
|
9043
9282
|
getSetZone
|
|
9044
9283
|
);
|
|
9045
|
-
proto.isDSTShifted = deprecate(
|
|
9284
|
+
proto$2.isDSTShifted = deprecate(
|
|
9046
9285
|
'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
|
|
9047
9286
|
isDaylightSavingTimeShifted
|
|
9048
9287
|
);
|
|
@@ -9061,13 +9300,13 @@ var moment$1 = {exports: {}};
|
|
|
9061
9300
|
|
|
9062
9301
|
var proto$1 = Locale.prototype;
|
|
9063
9302
|
|
|
9064
|
-
proto$1.calendar = calendar;
|
|
9303
|
+
proto$1.calendar = calendar$1;
|
|
9065
9304
|
proto$1.longDateFormat = longDateFormat;
|
|
9066
9305
|
proto$1.invalidDate = invalidDate;
|
|
9067
9306
|
proto$1.ordinal = ordinal;
|
|
9068
9307
|
proto$1.preparse = preParsePostFormat;
|
|
9069
9308
|
proto$1.postformat = preParsePostFormat;
|
|
9070
|
-
proto$1.relativeTime = relativeTime;
|
|
9309
|
+
proto$1.relativeTime = relativeTime$1;
|
|
9071
9310
|
proto$1.pastFuture = pastFuture;
|
|
9072
9311
|
proto$1.set = set;
|
|
9073
9312
|
proto$1.eras = localeEras;
|
|
@@ -9214,12 +9453,12 @@ var moment$1 = {exports: {}};
|
|
|
9214
9453
|
toInt((number % 100) / 10) === 1
|
|
9215
9454
|
? 'th'
|
|
9216
9455
|
: b === 1
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9456
|
+
? 'st'
|
|
9457
|
+
: b === 2
|
|
9458
|
+
? 'nd'
|
|
9459
|
+
: b === 3
|
|
9460
|
+
? 'rd'
|
|
9461
|
+
: 'th';
|
|
9223
9462
|
return number + output;
|
|
9224
9463
|
},
|
|
9225
9464
|
});
|
|
@@ -9237,7 +9476,7 @@ var moment$1 = {exports: {}};
|
|
|
9237
9476
|
|
|
9238
9477
|
var mathAbs = Math.abs;
|
|
9239
9478
|
|
|
9240
|
-
function abs() {
|
|
9479
|
+
function abs$1() {
|
|
9241
9480
|
var data = this._data;
|
|
9242
9481
|
|
|
9243
9482
|
this._milliseconds = mathAbs(this._milliseconds);
|
|
@@ -9254,7 +9493,7 @@ var moment$1 = {exports: {}};
|
|
|
9254
9493
|
return this;
|
|
9255
9494
|
}
|
|
9256
9495
|
|
|
9257
|
-
function addSubtract
|
|
9496
|
+
function addSubtract(duration, input, value, direction) {
|
|
9258
9497
|
var other = createDuration(input, value);
|
|
9259
9498
|
|
|
9260
9499
|
duration._milliseconds += direction * other._milliseconds;
|
|
@@ -9265,13 +9504,13 @@ var moment$1 = {exports: {}};
|
|
|
9265
9504
|
}
|
|
9266
9505
|
|
|
9267
9506
|
// supports only 2.0-style add(1, 's') or add(duration)
|
|
9268
|
-
function add
|
|
9269
|
-
return addSubtract
|
|
9507
|
+
function add(input, value) {
|
|
9508
|
+
return addSubtract(this, input, value, 1);
|
|
9270
9509
|
}
|
|
9271
9510
|
|
|
9272
9511
|
// supports only 2.0-style subtract(1, 's') or subtract(duration)
|
|
9273
|
-
function subtract
|
|
9274
|
-
return addSubtract
|
|
9512
|
+
function subtract(input, value) {
|
|
9513
|
+
return addSubtract(this, input, value, -1);
|
|
9275
9514
|
}
|
|
9276
9515
|
|
|
9277
9516
|
function absCeil(number) {
|
|
@@ -9295,12 +9534,10 @@ var moment$1 = {exports: {}};
|
|
|
9295
9534
|
|
|
9296
9535
|
// if we have a mix of positive and negative values, bubble down first
|
|
9297
9536
|
// check: https://github.com/moment/moment/issues/2166
|
|
9298
|
-
if (
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
)
|
|
9303
|
-
) {
|
|
9537
|
+
if (!(
|
|
9538
|
+
(milliseconds >= 0 && days >= 0 && months >= 0) ||
|
|
9539
|
+
(milliseconds <= 0 && days <= 0 && months <= 0)
|
|
9540
|
+
)) {
|
|
9304
9541
|
milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
|
|
9305
9542
|
days = 0;
|
|
9306
9543
|
months = 0;
|
|
@@ -9392,19 +9629,6 @@ var moment$1 = {exports: {}};
|
|
|
9392
9629
|
}
|
|
9393
9630
|
}
|
|
9394
9631
|
|
|
9395
|
-
// TODO: Use this.as('ms')?
|
|
9396
|
-
function valueOf$1() {
|
|
9397
|
-
if (!this.isValid()) {
|
|
9398
|
-
return NaN;
|
|
9399
|
-
}
|
|
9400
|
-
return (
|
|
9401
|
-
this._milliseconds +
|
|
9402
|
-
this._days * 864e5 +
|
|
9403
|
-
(this._months % 12) * 2592e6 +
|
|
9404
|
-
toInt(this._months / 12) * 31536e6
|
|
9405
|
-
);
|
|
9406
|
-
}
|
|
9407
|
-
|
|
9408
9632
|
function makeAs(alias) {
|
|
9409
9633
|
return function () {
|
|
9410
9634
|
return this.as(alias);
|
|
@@ -9419,13 +9643,14 @@ var moment$1 = {exports: {}};
|
|
|
9419
9643
|
asWeeks = makeAs('w'),
|
|
9420
9644
|
asMonths = makeAs('M'),
|
|
9421
9645
|
asQuarters = makeAs('Q'),
|
|
9422
|
-
asYears = makeAs('y')
|
|
9646
|
+
asYears = makeAs('y'),
|
|
9647
|
+
valueOf = asMilliseconds;
|
|
9423
9648
|
|
|
9424
|
-
function clone
|
|
9649
|
+
function clone() {
|
|
9425
9650
|
return createDuration(this);
|
|
9426
9651
|
}
|
|
9427
9652
|
|
|
9428
|
-
function get
|
|
9653
|
+
function get(units) {
|
|
9429
9654
|
units = normalizeUnits(units);
|
|
9430
9655
|
return this.isValid() ? this[units + 's']() : NaN;
|
|
9431
9656
|
}
|
|
@@ -9461,10 +9686,16 @@ var moment$1 = {exports: {}};
|
|
|
9461
9686
|
|
|
9462
9687
|
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
|
|
9463
9688
|
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
|
|
9464
|
-
return
|
|
9689
|
+
return relativeTimeWithoutPostformat.call(
|
|
9690
|
+
locale,
|
|
9691
|
+
number || 1,
|
|
9692
|
+
!!withoutSuffix,
|
|
9693
|
+
string,
|
|
9694
|
+
isFuture
|
|
9695
|
+
);
|
|
9465
9696
|
}
|
|
9466
9697
|
|
|
9467
|
-
function relativeTime
|
|
9698
|
+
function relativeTime(posNegDuration, withoutSuffix, thresholds, locale) {
|
|
9468
9699
|
var duration = createDuration(posNegDuration).abs(),
|
|
9469
9700
|
seconds = round(duration.as('s')),
|
|
9470
9701
|
minutes = round(duration.as('m')),
|
|
@@ -9545,29 +9776,29 @@ var moment$1 = {exports: {}};
|
|
|
9545
9776
|
withSuffix = argWithSuffix;
|
|
9546
9777
|
}
|
|
9547
9778
|
if (typeof argThresholds === 'object') {
|
|
9548
|
-
th =
|
|
9779
|
+
th = extend(extend({}, thresholds), argThresholds || {});
|
|
9549
9780
|
if (argThresholds.s != null && argThresholds.ss == null) {
|
|
9550
9781
|
th.ss = argThresholds.s - 1;
|
|
9551
9782
|
}
|
|
9552
9783
|
}
|
|
9553
9784
|
|
|
9554
9785
|
locale = this.localeData();
|
|
9555
|
-
output = relativeTime
|
|
9786
|
+
output = relativeTime(this, !withSuffix, th, locale);
|
|
9556
9787
|
|
|
9557
9788
|
if (withSuffix) {
|
|
9558
|
-
output =
|
|
9789
|
+
output = pastFutureWithoutPostformat.call(locale, +this, output);
|
|
9559
9790
|
}
|
|
9560
9791
|
|
|
9561
9792
|
return locale.postformat(output);
|
|
9562
9793
|
}
|
|
9563
9794
|
|
|
9564
|
-
var abs
|
|
9795
|
+
var abs = Math.abs;
|
|
9565
9796
|
|
|
9566
9797
|
function sign(x) {
|
|
9567
9798
|
return (x > 0) - (x < 0) || +x;
|
|
9568
9799
|
}
|
|
9569
9800
|
|
|
9570
|
-
function toISOString
|
|
9801
|
+
function toISOString() {
|
|
9571
9802
|
// for ISO strings we do not use the normal bubbling rules:
|
|
9572
9803
|
// * milliseconds bubble up until they become hours
|
|
9573
9804
|
// * days do not bubble at all
|
|
@@ -9579,9 +9810,9 @@ var moment$1 = {exports: {}};
|
|
|
9579
9810
|
return this.localeData().invalidDate();
|
|
9580
9811
|
}
|
|
9581
9812
|
|
|
9582
|
-
var seconds = abs
|
|
9583
|
-
days = abs
|
|
9584
|
-
months = abs
|
|
9813
|
+
var seconds = abs(this._milliseconds) / 1000,
|
|
9814
|
+
days = abs(this._days),
|
|
9815
|
+
months = abs(this._months),
|
|
9585
9816
|
minutes,
|
|
9586
9817
|
hours,
|
|
9587
9818
|
years,
|
|
@@ -9629,46 +9860,46 @@ var moment$1 = {exports: {}};
|
|
|
9629
9860
|
);
|
|
9630
9861
|
}
|
|
9631
9862
|
|
|
9632
|
-
var proto
|
|
9863
|
+
var proto = Duration.prototype;
|
|
9633
9864
|
|
|
9634
|
-
proto
|
|
9635
|
-
proto
|
|
9636
|
-
proto
|
|
9637
|
-
proto
|
|
9638
|
-
proto
|
|
9639
|
-
proto
|
|
9640
|
-
proto
|
|
9641
|
-
proto
|
|
9642
|
-
proto
|
|
9643
|
-
proto
|
|
9644
|
-
proto
|
|
9645
|
-
proto
|
|
9646
|
-
proto
|
|
9647
|
-
proto
|
|
9648
|
-
proto
|
|
9649
|
-
proto
|
|
9650
|
-
proto
|
|
9651
|
-
proto
|
|
9652
|
-
proto
|
|
9653
|
-
proto
|
|
9654
|
-
proto
|
|
9655
|
-
proto
|
|
9656
|
-
proto
|
|
9657
|
-
proto
|
|
9658
|
-
proto
|
|
9659
|
-
proto
|
|
9660
|
-
proto
|
|
9661
|
-
proto
|
|
9662
|
-
proto
|
|
9663
|
-
proto
|
|
9664
|
-
proto
|
|
9665
|
-
proto
|
|
9865
|
+
proto.isValid = isValid$1;
|
|
9866
|
+
proto.abs = abs$1;
|
|
9867
|
+
proto.add = add;
|
|
9868
|
+
proto.subtract = subtract;
|
|
9869
|
+
proto.as = as;
|
|
9870
|
+
proto.asMilliseconds = asMilliseconds;
|
|
9871
|
+
proto.asSeconds = asSeconds;
|
|
9872
|
+
proto.asMinutes = asMinutes;
|
|
9873
|
+
proto.asHours = asHours;
|
|
9874
|
+
proto.asDays = asDays;
|
|
9875
|
+
proto.asWeeks = asWeeks;
|
|
9876
|
+
proto.asMonths = asMonths;
|
|
9877
|
+
proto.asQuarters = asQuarters;
|
|
9878
|
+
proto.asYears = asYears;
|
|
9879
|
+
proto.valueOf = valueOf;
|
|
9880
|
+
proto._bubble = bubble;
|
|
9881
|
+
proto.clone = clone;
|
|
9882
|
+
proto.get = get;
|
|
9883
|
+
proto.milliseconds = milliseconds;
|
|
9884
|
+
proto.seconds = seconds;
|
|
9885
|
+
proto.minutes = minutes;
|
|
9886
|
+
proto.hours = hours;
|
|
9887
|
+
proto.days = days;
|
|
9888
|
+
proto.weeks = weeks;
|
|
9889
|
+
proto.months = months;
|
|
9890
|
+
proto.years = years;
|
|
9891
|
+
proto.humanize = humanize;
|
|
9892
|
+
proto.toISOString = toISOString;
|
|
9893
|
+
proto.toString = toISOString;
|
|
9894
|
+
proto.toJSON = toISOString;
|
|
9895
|
+
proto.locale = locale;
|
|
9896
|
+
proto.localeData = localeData;
|
|
9666
9897
|
|
|
9667
|
-
proto
|
|
9898
|
+
proto.toIsoString = deprecate(
|
|
9668
9899
|
'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
|
|
9669
|
-
toISOString
|
|
9900
|
+
toISOString
|
|
9670
9901
|
);
|
|
9671
|
-
proto
|
|
9902
|
+
proto.lang = lang;
|
|
9672
9903
|
|
|
9673
9904
|
// FORMATTING
|
|
9674
9905
|
|
|
@@ -9688,11 +9919,11 @@ var moment$1 = {exports: {}};
|
|
|
9688
9919
|
|
|
9689
9920
|
//! moment.js
|
|
9690
9921
|
|
|
9691
|
-
hooks.version = '2.
|
|
9922
|
+
hooks.version = '2.31.0';
|
|
9692
9923
|
|
|
9693
9924
|
setHookCallback(createLocal);
|
|
9694
9925
|
|
|
9695
|
-
hooks.fn = proto;
|
|
9926
|
+
hooks.fn = proto$2;
|
|
9696
9927
|
hooks.min = min;
|
|
9697
9928
|
hooks.max = max;
|
|
9698
9929
|
hooks.now = now;
|
|
@@ -9701,7 +9932,7 @@ var moment$1 = {exports: {}};
|
|
|
9701
9932
|
hooks.months = listMonths;
|
|
9702
9933
|
hooks.isDate = isDate;
|
|
9703
9934
|
hooks.locale = getSetGlobalLocale;
|
|
9704
|
-
hooks.invalid = createInvalid;
|
|
9935
|
+
hooks.invalid = createInvalid$1;
|
|
9705
9936
|
hooks.duration = createDuration;
|
|
9706
9937
|
hooks.isMoment = isMoment;
|
|
9707
9938
|
hooks.weekdays = listWeekdays;
|
|
@@ -9718,7 +9949,7 @@ var moment$1 = {exports: {}};
|
|
|
9718
9949
|
hooks.relativeTimeRounding = getSetRelativeTimeRounding;
|
|
9719
9950
|
hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
|
|
9720
9951
|
hooks.calendarFormat = getCalendarFormat;
|
|
9721
|
-
hooks.prototype = proto;
|
|
9952
|
+
hooks.prototype = proto$2;
|
|
9722
9953
|
|
|
9723
9954
|
// currently HTML5 input type only supports 24-hour formats
|
|
9724
9955
|
hooks.HTML5_FMT = {
|