@everymatrix/casino-tournament-banner 1.55.0 → 1.56.2
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.
- package/dist/casino-tournament-banner/casino-tournament-banner.esm.js +1 -1
- package/dist/casino-tournament-banner/p-6e64cd47.entry.js +9 -0
- package/dist/casino-tournament-banner/p-ac8cc1ef.js +2 -0
- package/dist/cjs/casino-tournament-banner.cjs.js +2 -2
- package/dist/cjs/casino-tournament-banner_2.cjs.entry.js +366 -369
- package/dist/cjs/{index-ceec4c54.js → index-0c7c7ceb.js} +7 -41
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/esm/casino-tournament-banner.js +3 -3
- package/dist/esm/casino-tournament-banner_2.entry.js +366 -369
- package/dist/esm/{index-4d03c228.js → index-4dc9a6b7.js} +7 -41
- package/dist/esm/loader.js +2 -2
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/casino-tournament-banner/p-890a4a7f.js +0 -2
- package/dist/casino-tournament-banner/p-cf75bb37.entry.js +0 -9
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0c7c7ceb.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
8
8
|
const TRANSLATIONS$1 = {
|
|
@@ -405,7 +405,7 @@ const getTranslations$1 = (data) => {
|
|
|
405
405
|
};
|
|
406
406
|
|
|
407
407
|
//! moment.js
|
|
408
|
-
//! version : 2.
|
|
408
|
+
//! version : 2.29.4
|
|
409
409
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
410
410
|
//! license : MIT
|
|
411
411
|
//! momentjs.com
|
|
@@ -555,25 +555,24 @@ if (Array.prototype.some) {
|
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
function isValid(m) {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
(!flags.meridiem || (flags.meridiem && parsedParts));
|
|
558
|
+
if (m._isValid == null) {
|
|
559
|
+
var flags = getParsingFlags(m),
|
|
560
|
+
parsedParts = some.call(flags.parsedDateParts, function (i) {
|
|
561
|
+
return i != null;
|
|
562
|
+
}),
|
|
563
|
+
isNowValid =
|
|
564
|
+
!isNaN(m._d.getTime()) &&
|
|
565
|
+
flags.overflow < 0 &&
|
|
566
|
+
!flags.empty &&
|
|
567
|
+
!flags.invalidEra &&
|
|
568
|
+
!flags.invalidMonth &&
|
|
569
|
+
!flags.invalidWeekday &&
|
|
570
|
+
!flags.weekdayMismatch &&
|
|
571
|
+
!flags.nullInput &&
|
|
572
|
+
!flags.invalidFormat &&
|
|
573
|
+
!flags.userInvalidated &&
|
|
574
|
+
(!flags.meridiem || (flags.meridiem && parsedParts));
|
|
575
|
+
|
|
577
576
|
if (m._strict) {
|
|
578
577
|
isNowValid =
|
|
579
578
|
isNowValid &&
|
|
@@ -581,11 +580,12 @@ function isValid(m) {
|
|
|
581
580
|
flags.unusedTokens.length === 0 &&
|
|
582
581
|
flags.bigHour === undefined;
|
|
583
582
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
583
|
+
|
|
584
|
+
if (Object.isFrozen == null || !Object.isFrozen(m)) {
|
|
585
|
+
m._isValid = isNowValid;
|
|
586
|
+
} else {
|
|
587
|
+
return isNowValid;
|
|
588
|
+
}
|
|
589
589
|
}
|
|
590
590
|
return m._isValid;
|
|
591
591
|
}
|
|
@@ -1030,56 +1030,12 @@ function pastFuture(diff, output) {
|
|
|
1030
1030
|
return isFunction(format) ? format(output) : format.replace(/%s/i, output);
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
|
-
var aliases = {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
day: 'day',
|
|
1040
|
-
e: 'weekday',
|
|
1041
|
-
weekdays: 'weekday',
|
|
1042
|
-
weekday: 'weekday',
|
|
1043
|
-
E: 'isoWeekday',
|
|
1044
|
-
isoweekdays: 'isoWeekday',
|
|
1045
|
-
isoweekday: 'isoWeekday',
|
|
1046
|
-
DDD: 'dayOfYear',
|
|
1047
|
-
dayofyears: 'dayOfYear',
|
|
1048
|
-
dayofyear: 'dayOfYear',
|
|
1049
|
-
h: 'hour',
|
|
1050
|
-
hours: 'hour',
|
|
1051
|
-
hour: 'hour',
|
|
1052
|
-
ms: 'millisecond',
|
|
1053
|
-
milliseconds: 'millisecond',
|
|
1054
|
-
millisecond: 'millisecond',
|
|
1055
|
-
m: 'minute',
|
|
1056
|
-
minutes: 'minute',
|
|
1057
|
-
minute: 'minute',
|
|
1058
|
-
M: 'month',
|
|
1059
|
-
months: 'month',
|
|
1060
|
-
month: 'month',
|
|
1061
|
-
Q: 'quarter',
|
|
1062
|
-
quarters: 'quarter',
|
|
1063
|
-
quarter: 'quarter',
|
|
1064
|
-
s: 'second',
|
|
1065
|
-
seconds: 'second',
|
|
1066
|
-
second: 'second',
|
|
1067
|
-
gg: 'weekYear',
|
|
1068
|
-
weekyears: 'weekYear',
|
|
1069
|
-
weekyear: 'weekYear',
|
|
1070
|
-
GG: 'isoWeekYear',
|
|
1071
|
-
isoweekyears: 'isoWeekYear',
|
|
1072
|
-
isoweekyear: 'isoWeekYear',
|
|
1073
|
-
w: 'week',
|
|
1074
|
-
weeks: 'week',
|
|
1075
|
-
week: 'week',
|
|
1076
|
-
W: 'isoWeek',
|
|
1077
|
-
isoweeks: 'isoWeek',
|
|
1078
|
-
isoweek: 'isoWeek',
|
|
1079
|
-
y: 'year',
|
|
1080
|
-
years: 'year',
|
|
1081
|
-
year: 'year',
|
|
1082
|
-
};
|
|
1033
|
+
var aliases = {};
|
|
1034
|
+
|
|
1035
|
+
function addUnitAlias(unit, shorthand) {
|
|
1036
|
+
var lowerCase = unit.toLowerCase();
|
|
1037
|
+
aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
|
|
1038
|
+
}
|
|
1083
1039
|
|
|
1084
1040
|
function normalizeUnits(units) {
|
|
1085
1041
|
return typeof units === 'string'
|
|
@@ -1104,24 +1060,11 @@ function normalizeObjectUnits(inputObject) {
|
|
|
1104
1060
|
return normalizedInput;
|
|
1105
1061
|
}
|
|
1106
1062
|
|
|
1107
|
-
var priorities = {
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
dayOfYear: 4,
|
|
1113
|
-
hour: 13,
|
|
1114
|
-
millisecond: 16,
|
|
1115
|
-
minute: 14,
|
|
1116
|
-
month: 8,
|
|
1117
|
-
quarter: 7,
|
|
1118
|
-
second: 15,
|
|
1119
|
-
weekYear: 1,
|
|
1120
|
-
isoWeekYear: 1,
|
|
1121
|
-
week: 5,
|
|
1122
|
-
isoWeek: 5,
|
|
1123
|
-
year: 1,
|
|
1124
|
-
};
|
|
1063
|
+
var priorities = {};
|
|
1064
|
+
|
|
1065
|
+
function addUnitPriority(unit, priority) {
|
|
1066
|
+
priorities[unit] = priority;
|
|
1067
|
+
}
|
|
1125
1068
|
|
|
1126
1069
|
function getPrioritizedUnits(unitsObj) {
|
|
1127
1070
|
var units = [],
|
|
@@ -1137,6 +1080,96 @@ function getPrioritizedUnits(unitsObj) {
|
|
|
1137
1080
|
return units;
|
|
1138
1081
|
}
|
|
1139
1082
|
|
|
1083
|
+
function isLeapYear(year) {
|
|
1084
|
+
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
function absFloor(number) {
|
|
1088
|
+
if (number < 0) {
|
|
1089
|
+
// -0 -> 0
|
|
1090
|
+
return Math.ceil(number) || 0;
|
|
1091
|
+
} else {
|
|
1092
|
+
return Math.floor(number);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
function toInt(argumentForCoercion) {
|
|
1097
|
+
var coercedNumber = +argumentForCoercion,
|
|
1098
|
+
value = 0;
|
|
1099
|
+
|
|
1100
|
+
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
|
|
1101
|
+
value = absFloor(coercedNumber);
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
return value;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
function makeGetSet(unit, keepTime) {
|
|
1108
|
+
return function (value) {
|
|
1109
|
+
if (value != null) {
|
|
1110
|
+
set$1(this, unit, value);
|
|
1111
|
+
hooks.updateOffset(this, keepTime);
|
|
1112
|
+
return this;
|
|
1113
|
+
} else {
|
|
1114
|
+
return get(this, unit);
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
function get(mom, unit) {
|
|
1120
|
+
return mom.isValid()
|
|
1121
|
+
? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
|
|
1122
|
+
: NaN;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
function set$1(mom, unit, value) {
|
|
1126
|
+
if (mom.isValid() && !isNaN(value)) {
|
|
1127
|
+
if (
|
|
1128
|
+
unit === 'FullYear' &&
|
|
1129
|
+
isLeapYear(mom.year()) &&
|
|
1130
|
+
mom.month() === 1 &&
|
|
1131
|
+
mom.date() === 29
|
|
1132
|
+
) {
|
|
1133
|
+
value = toInt(value);
|
|
1134
|
+
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
|
|
1135
|
+
value,
|
|
1136
|
+
mom.month(),
|
|
1137
|
+
daysInMonth(value, mom.month())
|
|
1138
|
+
);
|
|
1139
|
+
} else {
|
|
1140
|
+
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
// MOMENTS
|
|
1146
|
+
|
|
1147
|
+
function stringGet(units) {
|
|
1148
|
+
units = normalizeUnits(units);
|
|
1149
|
+
if (isFunction(this[units])) {
|
|
1150
|
+
return this[units]();
|
|
1151
|
+
}
|
|
1152
|
+
return this;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
function stringSet(units, value) {
|
|
1156
|
+
if (typeof units === 'object') {
|
|
1157
|
+
units = normalizeObjectUnits(units);
|
|
1158
|
+
var prioritized = getPrioritizedUnits(units),
|
|
1159
|
+
i,
|
|
1160
|
+
prioritizedLen = prioritized.length;
|
|
1161
|
+
for (i = 0; i < prioritizedLen; i++) {
|
|
1162
|
+
this[prioritized[i].unit](units[prioritized[i].unit]);
|
|
1163
|
+
}
|
|
1164
|
+
} else {
|
|
1165
|
+
units = normalizeUnits(units);
|
|
1166
|
+
if (isFunction(this[units])) {
|
|
1167
|
+
return this[units](value);
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
return this;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1140
1173
|
var match1 = /\d/, // 0 - 9
|
|
1141
1174
|
match2 = /\d\d/, // 00 - 99
|
|
1142
1175
|
match3 = /\d{3}/, // 000 - 999
|
|
@@ -1157,8 +1190,6 @@ var match1 = /\d/, // 0 - 9
|
|
|
1157
1190
|
// includes scottish gaelic two word and hyphenated months
|
|
1158
1191
|
matchWord =
|
|
1159
1192
|
/[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,
|
|
1160
|
-
match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
|
|
1161
|
-
match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
|
|
1162
1193
|
regexes;
|
|
1163
1194
|
|
|
1164
1195
|
regexes = {};
|
|
@@ -1197,26 +1228,6 @@ function regexEscape(s) {
|
|
|
1197
1228
|
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
1198
1229
|
}
|
|
1199
1230
|
|
|
1200
|
-
function absFloor(number) {
|
|
1201
|
-
if (number < 0) {
|
|
1202
|
-
// -0 -> 0
|
|
1203
|
-
return Math.ceil(number) || 0;
|
|
1204
|
-
} else {
|
|
1205
|
-
return Math.floor(number);
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
function toInt(argumentForCoercion) {
|
|
1210
|
-
var coercedNumber = +argumentForCoercion,
|
|
1211
|
-
value = 0;
|
|
1212
|
-
|
|
1213
|
-
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
|
|
1214
|
-
value = absFloor(coercedNumber);
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
return value;
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
1231
|
var tokens = {};
|
|
1221
1232
|
|
|
1222
1233
|
function addParseToken(token, callback) {
|
|
@@ -1250,10 +1261,6 @@ function addTimeToArrayFromToken(token, input, config) {
|
|
|
1250
1261
|
}
|
|
1251
1262
|
}
|
|
1252
1263
|
|
|
1253
|
-
function isLeapYear(year) {
|
|
1254
|
-
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
1264
|
var YEAR = 0,
|
|
1258
1265
|
MONTH = 1,
|
|
1259
1266
|
DATE = 2,
|
|
@@ -1264,173 +1271,6 @@ var YEAR = 0,
|
|
|
1264
1271
|
WEEK = 7,
|
|
1265
1272
|
WEEKDAY = 8;
|
|
1266
1273
|
|
|
1267
|
-
// FORMATTING
|
|
1268
|
-
|
|
1269
|
-
addFormatToken('Y', 0, 0, function () {
|
|
1270
|
-
var y = this.year();
|
|
1271
|
-
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
|
|
1272
|
-
});
|
|
1273
|
-
|
|
1274
|
-
addFormatToken(0, ['YY', 2], 0, function () {
|
|
1275
|
-
return this.year() % 100;
|
|
1276
|
-
});
|
|
1277
|
-
|
|
1278
|
-
addFormatToken(0, ['YYYY', 4], 0, 'year');
|
|
1279
|
-
addFormatToken(0, ['YYYYY', 5], 0, 'year');
|
|
1280
|
-
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
|
|
1281
|
-
|
|
1282
|
-
// PARSING
|
|
1283
|
-
|
|
1284
|
-
addRegexToken('Y', matchSigned);
|
|
1285
|
-
addRegexToken('YY', match1to2, match2);
|
|
1286
|
-
addRegexToken('YYYY', match1to4, match4);
|
|
1287
|
-
addRegexToken('YYYYY', match1to6, match6);
|
|
1288
|
-
addRegexToken('YYYYYY', match1to6, match6);
|
|
1289
|
-
|
|
1290
|
-
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
|
|
1291
|
-
addParseToken('YYYY', function (input, array) {
|
|
1292
|
-
array[YEAR] =
|
|
1293
|
-
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
|
|
1294
|
-
});
|
|
1295
|
-
addParseToken('YY', function (input, array) {
|
|
1296
|
-
array[YEAR] = hooks.parseTwoDigitYear(input);
|
|
1297
|
-
});
|
|
1298
|
-
addParseToken('Y', function (input, array) {
|
|
1299
|
-
array[YEAR] = parseInt(input, 10);
|
|
1300
|
-
});
|
|
1301
|
-
|
|
1302
|
-
// HELPERS
|
|
1303
|
-
|
|
1304
|
-
function daysInYear(year) {
|
|
1305
|
-
return isLeapYear(year) ? 366 : 365;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
// HOOKS
|
|
1309
|
-
|
|
1310
|
-
hooks.parseTwoDigitYear = function (input) {
|
|
1311
|
-
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
|
|
1312
|
-
};
|
|
1313
|
-
|
|
1314
|
-
// MOMENTS
|
|
1315
|
-
|
|
1316
|
-
var getSetYear = makeGetSet('FullYear', true);
|
|
1317
|
-
|
|
1318
|
-
function getIsLeapYear() {
|
|
1319
|
-
return isLeapYear(this.year());
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
function makeGetSet(unit, keepTime) {
|
|
1323
|
-
return function (value) {
|
|
1324
|
-
if (value != null) {
|
|
1325
|
-
set$1(this, unit, value);
|
|
1326
|
-
hooks.updateOffset(this, keepTime);
|
|
1327
|
-
return this;
|
|
1328
|
-
} else {
|
|
1329
|
-
return get(this, unit);
|
|
1330
|
-
}
|
|
1331
|
-
};
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
function get(mom, unit) {
|
|
1335
|
-
if (!mom.isValid()) {
|
|
1336
|
-
return NaN;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
var d = mom._d,
|
|
1340
|
-
isUTC = mom._isUTC;
|
|
1341
|
-
|
|
1342
|
-
switch (unit) {
|
|
1343
|
-
case 'Milliseconds':
|
|
1344
|
-
return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
|
|
1345
|
-
case 'Seconds':
|
|
1346
|
-
return isUTC ? d.getUTCSeconds() : d.getSeconds();
|
|
1347
|
-
case 'Minutes':
|
|
1348
|
-
return isUTC ? d.getUTCMinutes() : d.getMinutes();
|
|
1349
|
-
case 'Hours':
|
|
1350
|
-
return isUTC ? d.getUTCHours() : d.getHours();
|
|
1351
|
-
case 'Date':
|
|
1352
|
-
return isUTC ? d.getUTCDate() : d.getDate();
|
|
1353
|
-
case 'Day':
|
|
1354
|
-
return isUTC ? d.getUTCDay() : d.getDay();
|
|
1355
|
-
case 'Month':
|
|
1356
|
-
return isUTC ? d.getUTCMonth() : d.getMonth();
|
|
1357
|
-
case 'FullYear':
|
|
1358
|
-
return isUTC ? d.getUTCFullYear() : d.getFullYear();
|
|
1359
|
-
default:
|
|
1360
|
-
return NaN; // Just in case
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
function set$1(mom, unit, value) {
|
|
1365
|
-
var d, isUTC, year, month, date;
|
|
1366
|
-
|
|
1367
|
-
if (!mom.isValid() || isNaN(value)) {
|
|
1368
|
-
return;
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
d = mom._d;
|
|
1372
|
-
isUTC = mom._isUTC;
|
|
1373
|
-
|
|
1374
|
-
switch (unit) {
|
|
1375
|
-
case 'Milliseconds':
|
|
1376
|
-
return void (isUTC
|
|
1377
|
-
? d.setUTCMilliseconds(value)
|
|
1378
|
-
: d.setMilliseconds(value));
|
|
1379
|
-
case 'Seconds':
|
|
1380
|
-
return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
|
|
1381
|
-
case 'Minutes':
|
|
1382
|
-
return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
|
|
1383
|
-
case 'Hours':
|
|
1384
|
-
return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
|
|
1385
|
-
case 'Date':
|
|
1386
|
-
return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
|
|
1387
|
-
// case 'Day': // Not real
|
|
1388
|
-
// return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
|
|
1389
|
-
// case 'Month': // Not used because we need to pass two variables
|
|
1390
|
-
// return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
|
|
1391
|
-
case 'FullYear':
|
|
1392
|
-
break; // See below ...
|
|
1393
|
-
default:
|
|
1394
|
-
return; // Just in case
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
year = value;
|
|
1398
|
-
month = mom.month();
|
|
1399
|
-
date = mom.date();
|
|
1400
|
-
date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
|
|
1401
|
-
void (isUTC
|
|
1402
|
-
? d.setUTCFullYear(year, month, date)
|
|
1403
|
-
: d.setFullYear(year, month, date));
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
// MOMENTS
|
|
1407
|
-
|
|
1408
|
-
function stringGet(units) {
|
|
1409
|
-
units = normalizeUnits(units);
|
|
1410
|
-
if (isFunction(this[units])) {
|
|
1411
|
-
return this[units]();
|
|
1412
|
-
}
|
|
1413
|
-
return this;
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
function stringSet(units, value) {
|
|
1417
|
-
if (typeof units === 'object') {
|
|
1418
|
-
units = normalizeObjectUnits(units);
|
|
1419
|
-
var prioritized = getPrioritizedUnits(units),
|
|
1420
|
-
i,
|
|
1421
|
-
prioritizedLen = prioritized.length;
|
|
1422
|
-
for (i = 0; i < prioritizedLen; i++) {
|
|
1423
|
-
this[prioritized[i].unit](units[prioritized[i].unit]);
|
|
1424
|
-
}
|
|
1425
|
-
} else {
|
|
1426
|
-
units = normalizeUnits(units);
|
|
1427
|
-
if (isFunction(this[units])) {
|
|
1428
|
-
return this[units](value);
|
|
1429
|
-
}
|
|
1430
|
-
}
|
|
1431
|
-
return this;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
1274
|
function mod(n, x) {
|
|
1435
1275
|
return ((n % x) + x) % x;
|
|
1436
1276
|
}
|
|
@@ -1479,9 +1319,17 @@ addFormatToken('MMMM', 0, 0, function (format) {
|
|
|
1479
1319
|
return this.localeData().months(this, format);
|
|
1480
1320
|
});
|
|
1481
1321
|
|
|
1322
|
+
// ALIASES
|
|
1323
|
+
|
|
1324
|
+
addUnitAlias('month', 'M');
|
|
1325
|
+
|
|
1326
|
+
// PRIORITY
|
|
1327
|
+
|
|
1328
|
+
addUnitPriority('month', 8);
|
|
1329
|
+
|
|
1482
1330
|
// PARSING
|
|
1483
1331
|
|
|
1484
|
-
addRegexToken('M', match1to2
|
|
1332
|
+
addRegexToken('M', match1to2);
|
|
1485
1333
|
addRegexToken('MM', match1to2, match2);
|
|
1486
1334
|
addRegexToken('MMM', function (isStrict, locale) {
|
|
1487
1335
|
return locale.monthsShortRegex(isStrict);
|
|
@@ -1647,6 +1495,8 @@ function localeMonthsParse(monthName, format, strict) {
|
|
|
1647
1495
|
// MOMENTS
|
|
1648
1496
|
|
|
1649
1497
|
function setMonth(mom, value) {
|
|
1498
|
+
var dayOfMonth;
|
|
1499
|
+
|
|
1650
1500
|
if (!mom.isValid()) {
|
|
1651
1501
|
// No op
|
|
1652
1502
|
return mom;
|
|
@@ -1664,13 +1514,8 @@ function setMonth(mom, value) {
|
|
|
1664
1514
|
}
|
|
1665
1515
|
}
|
|
1666
1516
|
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
|
|
1671
|
-
void (mom._isUTC
|
|
1672
|
-
? mom._d.setUTCMonth(month, date)
|
|
1673
|
-
: mom._d.setMonth(month, date));
|
|
1517
|
+
dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
|
|
1518
|
+
mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
|
|
1674
1519
|
return mom;
|
|
1675
1520
|
}
|
|
1676
1521
|
|
|
@@ -1737,24 +1582,27 @@ function computeMonthsParse() {
|
|
|
1737
1582
|
longPieces = [],
|
|
1738
1583
|
mixedPieces = [],
|
|
1739
1584
|
i,
|
|
1740
|
-
mom
|
|
1741
|
-
shortP,
|
|
1742
|
-
longP;
|
|
1585
|
+
mom;
|
|
1743
1586
|
for (i = 0; i < 12; i++) {
|
|
1744
1587
|
// make the regex if we don't have it already
|
|
1745
1588
|
mom = createUTC([2000, i]);
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
mixedPieces.push(longP);
|
|
1751
|
-
mixedPieces.push(shortP);
|
|
1589
|
+
shortPieces.push(this.monthsShort(mom, ''));
|
|
1590
|
+
longPieces.push(this.months(mom, ''));
|
|
1591
|
+
mixedPieces.push(this.months(mom, ''));
|
|
1592
|
+
mixedPieces.push(this.monthsShort(mom, ''));
|
|
1752
1593
|
}
|
|
1753
1594
|
// Sorting makes sure if one month (or abbr) is a prefix of another it
|
|
1754
1595
|
// will match the longer piece.
|
|
1755
1596
|
shortPieces.sort(cmpLenRev);
|
|
1756
1597
|
longPieces.sort(cmpLenRev);
|
|
1757
1598
|
mixedPieces.sort(cmpLenRev);
|
|
1599
|
+
for (i = 0; i < 12; i++) {
|
|
1600
|
+
shortPieces[i] = regexEscape(shortPieces[i]);
|
|
1601
|
+
longPieces[i] = regexEscape(longPieces[i]);
|
|
1602
|
+
}
|
|
1603
|
+
for (i = 0; i < 24; i++) {
|
|
1604
|
+
mixedPieces[i] = regexEscape(mixedPieces[i]);
|
|
1605
|
+
}
|
|
1758
1606
|
|
|
1759
1607
|
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
|
|
1760
1608
|
this._monthsShortRegex = this._monthsRegex;
|
|
@@ -1768,6 +1616,69 @@ function computeMonthsParse() {
|
|
|
1768
1616
|
);
|
|
1769
1617
|
}
|
|
1770
1618
|
|
|
1619
|
+
// FORMATTING
|
|
1620
|
+
|
|
1621
|
+
addFormatToken('Y', 0, 0, function () {
|
|
1622
|
+
var y = this.year();
|
|
1623
|
+
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
|
|
1624
|
+
});
|
|
1625
|
+
|
|
1626
|
+
addFormatToken(0, ['YY', 2], 0, function () {
|
|
1627
|
+
return this.year() % 100;
|
|
1628
|
+
});
|
|
1629
|
+
|
|
1630
|
+
addFormatToken(0, ['YYYY', 4], 0, 'year');
|
|
1631
|
+
addFormatToken(0, ['YYYYY', 5], 0, 'year');
|
|
1632
|
+
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
|
|
1633
|
+
|
|
1634
|
+
// ALIASES
|
|
1635
|
+
|
|
1636
|
+
addUnitAlias('year', 'y');
|
|
1637
|
+
|
|
1638
|
+
// PRIORITIES
|
|
1639
|
+
|
|
1640
|
+
addUnitPriority('year', 1);
|
|
1641
|
+
|
|
1642
|
+
// PARSING
|
|
1643
|
+
|
|
1644
|
+
addRegexToken('Y', matchSigned);
|
|
1645
|
+
addRegexToken('YY', match1to2, match2);
|
|
1646
|
+
addRegexToken('YYYY', match1to4, match4);
|
|
1647
|
+
addRegexToken('YYYYY', match1to6, match6);
|
|
1648
|
+
addRegexToken('YYYYYY', match1to6, match6);
|
|
1649
|
+
|
|
1650
|
+
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
|
|
1651
|
+
addParseToken('YYYY', function (input, array) {
|
|
1652
|
+
array[YEAR] =
|
|
1653
|
+
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
|
|
1654
|
+
});
|
|
1655
|
+
addParseToken('YY', function (input, array) {
|
|
1656
|
+
array[YEAR] = hooks.parseTwoDigitYear(input);
|
|
1657
|
+
});
|
|
1658
|
+
addParseToken('Y', function (input, array) {
|
|
1659
|
+
array[YEAR] = parseInt(input, 10);
|
|
1660
|
+
});
|
|
1661
|
+
|
|
1662
|
+
// HELPERS
|
|
1663
|
+
|
|
1664
|
+
function daysInYear(year) {
|
|
1665
|
+
return isLeapYear(year) ? 366 : 365;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
// HOOKS
|
|
1669
|
+
|
|
1670
|
+
hooks.parseTwoDigitYear = function (input) {
|
|
1671
|
+
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
|
|
1672
|
+
};
|
|
1673
|
+
|
|
1674
|
+
// MOMENTS
|
|
1675
|
+
|
|
1676
|
+
var getSetYear = makeGetSet('FullYear', true);
|
|
1677
|
+
|
|
1678
|
+
function getIsLeapYear() {
|
|
1679
|
+
return isLeapYear(this.year());
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1771
1682
|
function createDate(y, m, d, h, M, s, ms) {
|
|
1772
1683
|
// can't just apply() to create a date:
|
|
1773
1684
|
// https://stackoverflow.com/q/181348
|
|
@@ -1873,11 +1784,21 @@ function weeksInYear(year, dow, doy) {
|
|
|
1873
1784
|
addFormatToken('w', ['ww', 2], 'wo', 'week');
|
|
1874
1785
|
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
|
|
1875
1786
|
|
|
1787
|
+
// ALIASES
|
|
1788
|
+
|
|
1789
|
+
addUnitAlias('week', 'w');
|
|
1790
|
+
addUnitAlias('isoWeek', 'W');
|
|
1791
|
+
|
|
1792
|
+
// PRIORITIES
|
|
1793
|
+
|
|
1794
|
+
addUnitPriority('week', 5);
|
|
1795
|
+
addUnitPriority('isoWeek', 5);
|
|
1796
|
+
|
|
1876
1797
|
// PARSING
|
|
1877
1798
|
|
|
1878
|
-
addRegexToken('w', match1to2
|
|
1799
|
+
addRegexToken('w', match1to2);
|
|
1879
1800
|
addRegexToken('ww', match1to2, match2);
|
|
1880
|
-
addRegexToken('W', match1to2
|
|
1801
|
+
addRegexToken('W', match1to2);
|
|
1881
1802
|
addRegexToken('WW', match1to2, match2);
|
|
1882
1803
|
|
|
1883
1804
|
addWeekParseToken(
|
|
@@ -1939,6 +1860,17 @@ addFormatToken('dddd', 0, 0, function (format) {
|
|
|
1939
1860
|
addFormatToken('e', 0, 0, 'weekday');
|
|
1940
1861
|
addFormatToken('E', 0, 0, 'isoWeekday');
|
|
1941
1862
|
|
|
1863
|
+
// ALIASES
|
|
1864
|
+
|
|
1865
|
+
addUnitAlias('day', 'd');
|
|
1866
|
+
addUnitAlias('weekday', 'e');
|
|
1867
|
+
addUnitAlias('isoWeekday', 'E');
|
|
1868
|
+
|
|
1869
|
+
// PRIORITY
|
|
1870
|
+
addUnitPriority('day', 11);
|
|
1871
|
+
addUnitPriority('weekday', 11);
|
|
1872
|
+
addUnitPriority('isoWeekday', 11);
|
|
1873
|
+
|
|
1942
1874
|
// PARSING
|
|
1943
1875
|
|
|
1944
1876
|
addRegexToken('d', match1to2);
|
|
@@ -2018,24 +1950,24 @@ function localeWeekdays(m, format) {
|
|
|
2018
1950
|
return m === true
|
|
2019
1951
|
? shiftWeekdays(weekdays, this._week.dow)
|
|
2020
1952
|
: m
|
|
2021
|
-
|
|
2022
|
-
|
|
1953
|
+
? weekdays[m.day()]
|
|
1954
|
+
: weekdays;
|
|
2023
1955
|
}
|
|
2024
1956
|
|
|
2025
1957
|
function localeWeekdaysShort(m) {
|
|
2026
1958
|
return m === true
|
|
2027
1959
|
? shiftWeekdays(this._weekdaysShort, this._week.dow)
|
|
2028
1960
|
: m
|
|
2029
|
-
|
|
2030
|
-
|
|
1961
|
+
? this._weekdaysShort[m.day()]
|
|
1962
|
+
: this._weekdaysShort;
|
|
2031
1963
|
}
|
|
2032
1964
|
|
|
2033
1965
|
function localeWeekdaysMin(m) {
|
|
2034
1966
|
return m === true
|
|
2035
1967
|
? shiftWeekdays(this._weekdaysMin, this._week.dow)
|
|
2036
1968
|
: m
|
|
2037
|
-
|
|
2038
|
-
|
|
1969
|
+
? this._weekdaysMin[m.day()]
|
|
1970
|
+
: this._weekdaysMin;
|
|
2039
1971
|
}
|
|
2040
1972
|
|
|
2041
1973
|
function handleStrictParse$1(weekdayName, format, strict) {
|
|
@@ -2184,8 +2116,7 @@ function getSetDayOfWeek(input) {
|
|
|
2184
2116
|
if (!this.isValid()) {
|
|
2185
2117
|
return input != null ? this : NaN;
|
|
2186
2118
|
}
|
|
2187
|
-
|
|
2188
|
-
var day = get(this, 'Day');
|
|
2119
|
+
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
|
|
2189
2120
|
if (input != null) {
|
|
2190
2121
|
input = parseWeekday(input, this.localeData());
|
|
2191
2122
|
return this.add(input - day, 'd');
|
|
@@ -2384,6 +2315,13 @@ function meridiem(token, lowercase) {
|
|
|
2384
2315
|
meridiem('a', true);
|
|
2385
2316
|
meridiem('A', false);
|
|
2386
2317
|
|
|
2318
|
+
// ALIASES
|
|
2319
|
+
|
|
2320
|
+
addUnitAlias('hour', 'h');
|
|
2321
|
+
|
|
2322
|
+
// PRIORITY
|
|
2323
|
+
addUnitPriority('hour', 13);
|
|
2324
|
+
|
|
2387
2325
|
// PARSING
|
|
2388
2326
|
|
|
2389
2327
|
function matchMeridiem(isStrict, locale) {
|
|
@@ -2392,9 +2330,9 @@ function matchMeridiem(isStrict, locale) {
|
|
|
2392
2330
|
|
|
2393
2331
|
addRegexToken('a', matchMeridiem);
|
|
2394
2332
|
addRegexToken('A', matchMeridiem);
|
|
2395
|
-
addRegexToken('H', match1to2
|
|
2396
|
-
addRegexToken('h', match1to2
|
|
2397
|
-
addRegexToken('k', match1to2
|
|
2333
|
+
addRegexToken('H', match1to2);
|
|
2334
|
+
addRegexToken('h', match1to2);
|
|
2335
|
+
addRegexToken('k', match1to2);
|
|
2398
2336
|
addRegexToken('HH', match1to2, match2);
|
|
2399
2337
|
addRegexToken('hh', match1to2, match2);
|
|
2400
2338
|
addRegexToken('kk', match1to2, match2);
|
|
@@ -2544,8 +2482,7 @@ function chooseLocale(names) {
|
|
|
2544
2482
|
|
|
2545
2483
|
function isLocaleNameSane(name) {
|
|
2546
2484
|
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
|
|
2547
|
-
|
|
2548
|
-
return !!(name && name.match('^[^/\\\\]*$'));
|
|
2485
|
+
return name.match('^[^/\\\\]*$') != null;
|
|
2549
2486
|
}
|
|
2550
2487
|
|
|
2551
2488
|
function loadLocale(name) {
|
|
@@ -2737,21 +2674,21 @@ function checkOverflow(m) {
|
|
|
2737
2674
|
a[MONTH] < 0 || a[MONTH] > 11
|
|
2738
2675
|
? MONTH
|
|
2739
2676
|
: a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2677
|
+
? DATE
|
|
2678
|
+
: a[HOUR] < 0 ||
|
|
2679
|
+
a[HOUR] > 24 ||
|
|
2680
|
+
(a[HOUR] === 24 &&
|
|
2681
|
+
(a[MINUTE] !== 0 ||
|
|
2682
|
+
a[SECOND] !== 0 ||
|
|
2683
|
+
a[MILLISECOND] !== 0))
|
|
2684
|
+
? HOUR
|
|
2685
|
+
: a[MINUTE] < 0 || a[MINUTE] > 59
|
|
2686
|
+
? MINUTE
|
|
2687
|
+
: a[SECOND] < 0 || a[SECOND] > 59
|
|
2688
|
+
? SECOND
|
|
2689
|
+
: a[MILLISECOND] < 0 || a[MILLISECOND] > 999
|
|
2690
|
+
? MILLISECOND
|
|
2691
|
+
: -1;
|
|
2755
2692
|
|
|
2756
2693
|
if (
|
|
2757
2694
|
getParsingFlags(m)._overflowDayOfYear &&
|
|
@@ -4192,16 +4129,16 @@ function getCalendarFormat(myMoment, now) {
|
|
|
4192
4129
|
return diff < -6
|
|
4193
4130
|
? 'sameElse'
|
|
4194
4131
|
: diff < -1
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4132
|
+
? 'lastWeek'
|
|
4133
|
+
: diff < 0
|
|
4134
|
+
? 'lastDay'
|
|
4135
|
+
: diff < 1
|
|
4136
|
+
? 'sameDay'
|
|
4137
|
+
: diff < 2
|
|
4138
|
+
? 'nextDay'
|
|
4139
|
+
: diff < 7
|
|
4140
|
+
? 'nextWeek'
|
|
4141
|
+
: 'sameElse';
|
|
4205
4142
|
}
|
|
4206
4143
|
|
|
4207
4144
|
function calendar$1(time, formats) {
|
|
@@ -5009,22 +4946,16 @@ function computeErasParse() {
|
|
|
5009
4946
|
mixedPieces = [],
|
|
5010
4947
|
i,
|
|
5011
4948
|
l,
|
|
5012
|
-
erasName,
|
|
5013
|
-
erasAbbr,
|
|
5014
|
-
erasNarrow,
|
|
5015
4949
|
eras = this.eras();
|
|
5016
4950
|
|
|
5017
4951
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
4952
|
+
namePieces.push(regexEscape(eras[i].name));
|
|
4953
|
+
abbrPieces.push(regexEscape(eras[i].abbr));
|
|
4954
|
+
narrowPieces.push(regexEscape(eras[i].narrow));
|
|
5021
4955
|
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
mixedPieces.push(erasName);
|
|
5026
|
-
mixedPieces.push(erasAbbr);
|
|
5027
|
-
mixedPieces.push(erasNarrow);
|
|
4956
|
+
mixedPieces.push(regexEscape(eras[i].name));
|
|
4957
|
+
mixedPieces.push(regexEscape(eras[i].abbr));
|
|
4958
|
+
mixedPieces.push(regexEscape(eras[i].narrow));
|
|
5028
4959
|
}
|
|
5029
4960
|
|
|
5030
4961
|
this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
|
|
@@ -5057,6 +4988,14 @@ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
|
|
|
5057
4988
|
|
|
5058
4989
|
// ALIASES
|
|
5059
4990
|
|
|
4991
|
+
addUnitAlias('weekYear', 'gg');
|
|
4992
|
+
addUnitAlias('isoWeekYear', 'GG');
|
|
4993
|
+
|
|
4994
|
+
// PRIORITY
|
|
4995
|
+
|
|
4996
|
+
addUnitPriority('weekYear', 1);
|
|
4997
|
+
addUnitPriority('isoWeekYear', 1);
|
|
4998
|
+
|
|
5060
4999
|
// PARSING
|
|
5061
5000
|
|
|
5062
5001
|
addRegexToken('G', matchSigned);
|
|
@@ -5086,7 +5025,7 @@ function getSetWeekYear(input) {
|
|
|
5086
5025
|
this,
|
|
5087
5026
|
input,
|
|
5088
5027
|
this.week(),
|
|
5089
|
-
this.weekday()
|
|
5028
|
+
this.weekday(),
|
|
5090
5029
|
this.localeData()._week.dow,
|
|
5091
5030
|
this.localeData()._week.doy
|
|
5092
5031
|
);
|
|
@@ -5148,6 +5087,14 @@ function setWeekAll(weekYear, week, weekday, dow, doy) {
|
|
|
5148
5087
|
|
|
5149
5088
|
addFormatToken('Q', 0, 'Qo', 'quarter');
|
|
5150
5089
|
|
|
5090
|
+
// ALIASES
|
|
5091
|
+
|
|
5092
|
+
addUnitAlias('quarter', 'Q');
|
|
5093
|
+
|
|
5094
|
+
// PRIORITY
|
|
5095
|
+
|
|
5096
|
+
addUnitPriority('quarter', 7);
|
|
5097
|
+
|
|
5151
5098
|
// PARSING
|
|
5152
5099
|
|
|
5153
5100
|
addRegexToken('Q', match1);
|
|
@@ -5167,9 +5114,16 @@ function getSetQuarter(input) {
|
|
|
5167
5114
|
|
|
5168
5115
|
addFormatToken('D', ['DD', 2], 'Do', 'date');
|
|
5169
5116
|
|
|
5117
|
+
// ALIASES
|
|
5118
|
+
|
|
5119
|
+
addUnitAlias('date', 'D');
|
|
5120
|
+
|
|
5121
|
+
// PRIORITY
|
|
5122
|
+
addUnitPriority('date', 9);
|
|
5123
|
+
|
|
5170
5124
|
// PARSING
|
|
5171
5125
|
|
|
5172
|
-
addRegexToken('D', match1to2
|
|
5126
|
+
addRegexToken('D', match1to2);
|
|
5173
5127
|
addRegexToken('DD', match1to2, match2);
|
|
5174
5128
|
addRegexToken('Do', function (isStrict, locale) {
|
|
5175
5129
|
// TODO: Remove "ordinalParse" fallback in next major release.
|
|
@@ -5191,6 +5145,13 @@ var getSetDayOfMonth = makeGetSet('Date', true);
|
|
|
5191
5145
|
|
|
5192
5146
|
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
|
|
5193
5147
|
|
|
5148
|
+
// ALIASES
|
|
5149
|
+
|
|
5150
|
+
addUnitAlias('dayOfYear', 'DDD');
|
|
5151
|
+
|
|
5152
|
+
// PRIORITY
|
|
5153
|
+
addUnitPriority('dayOfYear', 4);
|
|
5154
|
+
|
|
5194
5155
|
// PARSING
|
|
5195
5156
|
|
|
5196
5157
|
addRegexToken('DDD', match1to3);
|
|
@@ -5215,9 +5176,17 @@ function getSetDayOfYear(input) {
|
|
|
5215
5176
|
|
|
5216
5177
|
addFormatToken('m', ['mm', 2], 0, 'minute');
|
|
5217
5178
|
|
|
5179
|
+
// ALIASES
|
|
5180
|
+
|
|
5181
|
+
addUnitAlias('minute', 'm');
|
|
5182
|
+
|
|
5183
|
+
// PRIORITY
|
|
5184
|
+
|
|
5185
|
+
addUnitPriority('minute', 14);
|
|
5186
|
+
|
|
5218
5187
|
// PARSING
|
|
5219
5188
|
|
|
5220
|
-
addRegexToken('m', match1to2
|
|
5189
|
+
addRegexToken('m', match1to2);
|
|
5221
5190
|
addRegexToken('mm', match1to2, match2);
|
|
5222
5191
|
addParseToken(['m', 'mm'], MINUTE);
|
|
5223
5192
|
|
|
@@ -5229,9 +5198,17 @@ var getSetMinute = makeGetSet('Minutes', false);
|
|
|
5229
5198
|
|
|
5230
5199
|
addFormatToken('s', ['ss', 2], 0, 'second');
|
|
5231
5200
|
|
|
5201
|
+
// ALIASES
|
|
5202
|
+
|
|
5203
|
+
addUnitAlias('second', 's');
|
|
5204
|
+
|
|
5205
|
+
// PRIORITY
|
|
5206
|
+
|
|
5207
|
+
addUnitPriority('second', 15);
|
|
5208
|
+
|
|
5232
5209
|
// PARSING
|
|
5233
5210
|
|
|
5234
|
-
addRegexToken('s', match1to2
|
|
5211
|
+
addRegexToken('s', match1to2);
|
|
5235
5212
|
addRegexToken('ss', match1to2, match2);
|
|
5236
5213
|
addParseToken(['s', 'ss'], SECOND);
|
|
5237
5214
|
|
|
@@ -5269,6 +5246,14 @@ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
|
|
|
5269
5246
|
return this.millisecond() * 1000000;
|
|
5270
5247
|
});
|
|
5271
5248
|
|
|
5249
|
+
// ALIASES
|
|
5250
|
+
|
|
5251
|
+
addUnitAlias('millisecond', 'ms');
|
|
5252
|
+
|
|
5253
|
+
// PRIORITY
|
|
5254
|
+
|
|
5255
|
+
addUnitPriority('millisecond', 16);
|
|
5256
|
+
|
|
5272
5257
|
// PARSING
|
|
5273
5258
|
|
|
5274
5259
|
addRegexToken('S', match1to3, match1);
|
|
@@ -5576,12 +5561,12 @@ getSetGlobalLocale('en', {
|
|
|
5576
5561
|
toInt((number % 100) / 10) === 1
|
|
5577
5562
|
? 'th'
|
|
5578
5563
|
: b === 1
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5564
|
+
? 'st'
|
|
5565
|
+
: b === 2
|
|
5566
|
+
? 'nd'
|
|
5567
|
+
: b === 3
|
|
5568
|
+
? 'rd'
|
|
5569
|
+
: 'th';
|
|
5585
5570
|
return number + output;
|
|
5586
5571
|
},
|
|
5587
5572
|
});
|
|
@@ -5754,6 +5739,19 @@ function as(units) {
|
|
|
5754
5739
|
}
|
|
5755
5740
|
}
|
|
5756
5741
|
|
|
5742
|
+
// TODO: Use this.as('ms')?
|
|
5743
|
+
function valueOf$1() {
|
|
5744
|
+
if (!this.isValid()) {
|
|
5745
|
+
return NaN;
|
|
5746
|
+
}
|
|
5747
|
+
return (
|
|
5748
|
+
this._milliseconds +
|
|
5749
|
+
this._days * 864e5 +
|
|
5750
|
+
(this._months % 12) * 2592e6 +
|
|
5751
|
+
toInt(this._months / 12) * 31536e6
|
|
5752
|
+
);
|
|
5753
|
+
}
|
|
5754
|
+
|
|
5757
5755
|
function makeAs(alias) {
|
|
5758
5756
|
return function () {
|
|
5759
5757
|
return this.as(alias);
|
|
@@ -5768,8 +5766,7 @@ var asMilliseconds = makeAs('ms'),
|
|
|
5768
5766
|
asWeeks = makeAs('w'),
|
|
5769
5767
|
asMonths = makeAs('M'),
|
|
5770
5768
|
asQuarters = makeAs('Q'),
|
|
5771
|
-
asYears = makeAs('y')
|
|
5772
|
-
valueOf$1 = asMilliseconds;
|
|
5769
|
+
asYears = makeAs('y');
|
|
5773
5770
|
|
|
5774
5771
|
function clone$1() {
|
|
5775
5772
|
return createDuration(this);
|
|
@@ -6038,7 +6035,7 @@ addParseToken('x', function (input, array, config) {
|
|
|
6038
6035
|
|
|
6039
6036
|
//! moment.js
|
|
6040
6037
|
|
|
6041
|
-
hooks.version = '2.
|
|
6038
|
+
hooks.version = '2.29.4';
|
|
6042
6039
|
|
|
6043
6040
|
setHookCallback(createLocal);
|
|
6044
6041
|
|