Edit File by line
/home/barbar84/www/wp-inclu.../js/dist/vendor
File: moment.js
// for ISO strings we do not use the normal bubbling rules:
[5500] Fix | Delete
// * milliseconds bubble up until they become hours
[5501] Fix | Delete
// * days do not bubble at all
[5502] Fix | Delete
// * months bubble up until they become years
[5503] Fix | Delete
// This is because there is no context-free conversion between hours and days
[5504] Fix | Delete
// (think of clock changes)
[5505] Fix | Delete
// and also not between days and months (28-31 days per month)
[5506] Fix | Delete
if (!this.isValid()) {
[5507] Fix | Delete
return this.localeData().invalidDate();
[5508] Fix | Delete
}
[5509] Fix | Delete
[5510] Fix | Delete
var seconds = abs$1(this._milliseconds) / 1000,
[5511] Fix | Delete
days = abs$1(this._days),
[5512] Fix | Delete
months = abs$1(this._months),
[5513] Fix | Delete
minutes,
[5514] Fix | Delete
hours,
[5515] Fix | Delete
years,
[5516] Fix | Delete
s,
[5517] Fix | Delete
total = this.asSeconds(),
[5518] Fix | Delete
totalSign,
[5519] Fix | Delete
ymSign,
[5520] Fix | Delete
daysSign,
[5521] Fix | Delete
hmsSign;
[5522] Fix | Delete
[5523] Fix | Delete
if (!total) {
[5524] Fix | Delete
// this is the same as C#'s (Noda) and python (isodate)...
[5525] Fix | Delete
// but not other JS (goog.date)
[5526] Fix | Delete
return 'P0D';
[5527] Fix | Delete
}
[5528] Fix | Delete
[5529] Fix | Delete
// 3600 seconds -> 60 minutes -> 1 hour
[5530] Fix | Delete
minutes = absFloor(seconds / 60);
[5531] Fix | Delete
hours = absFloor(minutes / 60);
[5532] Fix | Delete
seconds %= 60;
[5533] Fix | Delete
minutes %= 60;
[5534] Fix | Delete
[5535] Fix | Delete
// 12 months -> 1 year
[5536] Fix | Delete
years = absFloor(months / 12);
[5537] Fix | Delete
months %= 12;
[5538] Fix | Delete
[5539] Fix | Delete
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
[5540] Fix | Delete
s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
[5541] Fix | Delete
[5542] Fix | Delete
totalSign = total < 0 ? '-' : '';
[5543] Fix | Delete
ymSign = sign(this._months) !== sign(total) ? '-' : '';
[5544] Fix | Delete
daysSign = sign(this._days) !== sign(total) ? '-' : '';
[5545] Fix | Delete
hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
[5546] Fix | Delete
[5547] Fix | Delete
return (
[5548] Fix | Delete
totalSign +
[5549] Fix | Delete
'P' +
[5550] Fix | Delete
(years ? ymSign + years + 'Y' : '') +
[5551] Fix | Delete
(months ? ymSign + months + 'M' : '') +
[5552] Fix | Delete
(days ? daysSign + days + 'D' : '') +
[5553] Fix | Delete
(hours || minutes || seconds ? 'T' : '') +
[5554] Fix | Delete
(hours ? hmsSign + hours + 'H' : '') +
[5555] Fix | Delete
(minutes ? hmsSign + minutes + 'M' : '') +
[5556] Fix | Delete
(seconds ? hmsSign + s + 'S' : '')
[5557] Fix | Delete
);
[5558] Fix | Delete
}
[5559] Fix | Delete
[5560] Fix | Delete
var proto$2 = Duration.prototype;
[5561] Fix | Delete
[5562] Fix | Delete
proto$2.isValid = isValid$1;
[5563] Fix | Delete
proto$2.abs = abs;
[5564] Fix | Delete
proto$2.add = add$1;
[5565] Fix | Delete
proto$2.subtract = subtract$1;
[5566] Fix | Delete
proto$2.as = as;
[5567] Fix | Delete
proto$2.asMilliseconds = asMilliseconds;
[5568] Fix | Delete
proto$2.asSeconds = asSeconds;
[5569] Fix | Delete
proto$2.asMinutes = asMinutes;
[5570] Fix | Delete
proto$2.asHours = asHours;
[5571] Fix | Delete
proto$2.asDays = asDays;
[5572] Fix | Delete
proto$2.asWeeks = asWeeks;
[5573] Fix | Delete
proto$2.asMonths = asMonths;
[5574] Fix | Delete
proto$2.asQuarters = asQuarters;
[5575] Fix | Delete
proto$2.asYears = asYears;
[5576] Fix | Delete
proto$2.valueOf = valueOf$1;
[5577] Fix | Delete
proto$2._bubble = bubble;
[5578] Fix | Delete
proto$2.clone = clone$1;
[5579] Fix | Delete
proto$2.get = get$2;
[5580] Fix | Delete
proto$2.milliseconds = milliseconds;
[5581] Fix | Delete
proto$2.seconds = seconds;
[5582] Fix | Delete
proto$2.minutes = minutes;
[5583] Fix | Delete
proto$2.hours = hours;
[5584] Fix | Delete
proto$2.days = days;
[5585] Fix | Delete
proto$2.weeks = weeks;
[5586] Fix | Delete
proto$2.months = months;
[5587] Fix | Delete
proto$2.years = years;
[5588] Fix | Delete
proto$2.humanize = humanize;
[5589] Fix | Delete
proto$2.toISOString = toISOString$1;
[5590] Fix | Delete
proto$2.toString = toISOString$1;
[5591] Fix | Delete
proto$2.toJSON = toISOString$1;
[5592] Fix | Delete
proto$2.locale = locale;
[5593] Fix | Delete
proto$2.localeData = localeData;
[5594] Fix | Delete
[5595] Fix | Delete
proto$2.toIsoString = deprecate(
[5596] Fix | Delete
'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
[5597] Fix | Delete
toISOString$1
[5598] Fix | Delete
);
[5599] Fix | Delete
proto$2.lang = lang;
[5600] Fix | Delete
[5601] Fix | Delete
// FORMATTING
[5602] Fix | Delete
[5603] Fix | Delete
addFormatToken('X', 0, 0, 'unix');
[5604] Fix | Delete
addFormatToken('x', 0, 0, 'valueOf');
[5605] Fix | Delete
[5606] Fix | Delete
// PARSING
[5607] Fix | Delete
[5608] Fix | Delete
addRegexToken('x', matchSigned);
[5609] Fix | Delete
addRegexToken('X', matchTimestamp);
[5610] Fix | Delete
addParseToken('X', function (input, array, config) {
[5611] Fix | Delete
config._d = new Date(parseFloat(input) * 1000);
[5612] Fix | Delete
});
[5613] Fix | Delete
addParseToken('x', function (input, array, config) {
[5614] Fix | Delete
config._d = new Date(toInt(input));
[5615] Fix | Delete
});
[5616] Fix | Delete
[5617] Fix | Delete
//! moment.js
[5618] Fix | Delete
[5619] Fix | Delete
hooks.version = '2.27.0';
[5620] Fix | Delete
[5621] Fix | Delete
setHookCallback(createLocal);
[5622] Fix | Delete
[5623] Fix | Delete
hooks.fn = proto;
[5624] Fix | Delete
hooks.min = min;
[5625] Fix | Delete
hooks.max = max;
[5626] Fix | Delete
hooks.now = now;
[5627] Fix | Delete
hooks.utc = createUTC;
[5628] Fix | Delete
hooks.unix = createUnix;
[5629] Fix | Delete
hooks.months = listMonths;
[5630] Fix | Delete
hooks.isDate = isDate;
[5631] Fix | Delete
hooks.locale = getSetGlobalLocale;
[5632] Fix | Delete
hooks.invalid = createInvalid;
[5633] Fix | Delete
hooks.duration = createDuration;
[5634] Fix | Delete
hooks.isMoment = isMoment;
[5635] Fix | Delete
hooks.weekdays = listWeekdays;
[5636] Fix | Delete
hooks.parseZone = createInZone;
[5637] Fix | Delete
hooks.localeData = getLocale;
[5638] Fix | Delete
hooks.isDuration = isDuration;
[5639] Fix | Delete
hooks.monthsShort = listMonthsShort;
[5640] Fix | Delete
hooks.weekdaysMin = listWeekdaysMin;
[5641] Fix | Delete
hooks.defineLocale = defineLocale;
[5642] Fix | Delete
hooks.updateLocale = updateLocale;
[5643] Fix | Delete
hooks.locales = listLocales;
[5644] Fix | Delete
hooks.weekdaysShort = listWeekdaysShort;
[5645] Fix | Delete
hooks.normalizeUnits = normalizeUnits;
[5646] Fix | Delete
hooks.relativeTimeRounding = getSetRelativeTimeRounding;
[5647] Fix | Delete
hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
[5648] Fix | Delete
hooks.calendarFormat = getCalendarFormat;
[5649] Fix | Delete
hooks.prototype = proto;
[5650] Fix | Delete
[5651] Fix | Delete
// currently HTML5 input type only supports 24-hour formats
[5652] Fix | Delete
hooks.HTML5_FMT = {
[5653] Fix | Delete
DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
[5654] Fix | Delete
DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
[5655] Fix | Delete
DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
[5656] Fix | Delete
DATE: 'YYYY-MM-DD', // <input type="date" />
[5657] Fix | Delete
TIME: 'HH:mm', // <input type="time" />
[5658] Fix | Delete
TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
[5659] Fix | Delete
TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
[5660] Fix | Delete
WEEK: 'GGGG-[W]WW', // <input type="week" />
[5661] Fix | Delete
MONTH: 'YYYY-MM', // <input type="month" />
[5662] Fix | Delete
};
[5663] Fix | Delete
[5664] Fix | Delete
return hooks;
[5665] Fix | Delete
[5666] Fix | Delete
})));
[5667] Fix | Delete
[5668] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function