public/assets/moment-0da3eb4ebf8fb8c3113d89afb90e5b7a87760d21b5b39a405a51fe05c8e40fd8.js
File moment-0da3eb4ebf8fb8c3113d89afb90e5b7a87760d21b5b39a405a51fe05c8e40fd8.js
has 3198 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
//! moment.js
//! version : 2.15.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
Consider simplifying this complex logical expression. Open
Open
if (a && getParsingFlags(m).overflow === -2) {
overflow =
a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
Function day_of_week__handleStrictParse
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function day_of_week__handleStrictParse(weekdayName, format, strict) {
var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
Consider simplifying this complex logical expression. Open
Open
if (m._isValid == null) {
var flags = getParsingFlags(m);
var parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
});
Function create__createDuration
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function create__createDuration (input, key) {
var duration = input,
// matching against regexp is expensive, do it on demand
match = null,
sign,
Function configFromStringAndFormat
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function configFromStringAndFormat(config) {
// TODO: Move this to another part of the creation flow to prevent circular deps
if (config._f === utils_hooks__hooks.ISO_8601) {
configFromISO(config);
return;
Function configFromISO
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function configFromISO(config) {
var i, l,
string = config._i,
match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
allowTime, dateFormat, timeFormat, tzFormat;
Function copyConfig
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function copyConfig(to, from) {
var i, prop, val;
if (!isUndefined(from._isAMomentObject)) {
to._isAMomentObject = from._isAMomentObject;
Function dayOfYearFromWeekInfo
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dayOfYearFromWeekInfo(config) {
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
Function configFromArray
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function configFromArray (config) {
var i, date, input = [], currentDate, yearToUse;
if (config._d) {
return;
Function units_month__handleStrictParse
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function units_month__handleStrictParse(monthName, format, strict) {
var i, ii, mom, llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
Function computeWeekdaysParse
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function computeWeekdaysParse () {
function cmpLenRev(a, b) {
return b.length - a.length;
}
Function getSetOffset
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getSetOffset (input, keepLocalTime) {
var offset = this._offset || 0,
localAdjust;
if (!this.isValid()) {
return input != null ? this : NaN;
Function localeWeekdaysParse
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function localeWeekdaysParse (weekdayName, format, strict) {
var i, mom, regex;
if (this._weekdaysParseExact) {
return day_of_week__handleStrictParse.call(this, weekdayName, format, strict);
Function configFromStringAndArray
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function configFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
Function startOf
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function startOf (units) {
units = normalizeUnits(units);
// the following switch intentionally omits break keywords
// to utilize falling through the cases.
switch (units) {
Function iso_string__toISOString
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function iso_string__toISOString() {
// for ISO strings we do not use the normal bubbling rules:
// * milliseconds bubble up until they become hours
// * days do not bubble at all
// * months bubble up until they become years
Function diff
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function diff (input, units, asFloat) {
var that,
zoneDelta,
delta, output;
Function bubble
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bubble () {
var milliseconds = this._milliseconds;
var days = this._days;
var months = this._months;
var data = this._data;
Function valid__isValid
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function valid__isValid(m) {
if (m._isValid == null) {
var flags = getParsingFlags(m);
var parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
Function listWeekdaysImpl
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function listWeekdaysImpl (localeSorted, format, index, field) {
if (typeof localeSorted === 'boolean') {
if (typeof format === 'number') {
index = format;
format = undefined;
Function localeMonthsParse
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function localeMonthsParse (monthName, format, strict) {
var i, mom, regex;
if (this._monthsParseExact) {
return units_month__handleStrictParse.call(this, monthName, format, strict);
Function computeMonthsParse
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function computeMonthsParse () {
function cmpLenRev(a, b) {
return b.length - a.length;
}
Function deprecate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function deprecate(msg, fn) {
var firstTime = true;
return extend(function () {
if (utils_hooks__hooks.deprecationHandler != null) {
Function createDate
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function createDate (y, m, d, h, M, s, ms) {
Consider simplifying this complex logical expression. Open
Open
if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
(milliseconds <= 0 && days <= 0 && months <= 0))) {
milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
days = 0;
months = 0;
Function setWeekAll
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function setWeekAll(weekYear, week, weekday, dow, doy) {
Function createLocalOrUTC
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function createLocalOrUTC (input, format, locale, strict, isUTC) {
Function dayOfYearFromWeeks
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
Function substituteTimeAgo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
Function getSetWeekYearHelper
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function getSetWeekYearHelper(input, week, weekday, dow, doy) {
Avoid too many return
statements within this function. Open
Open
return ii !== -1 ? ii : null;
Avoid too many return
statements within this function. Open
Open
return ii;
Avoid too many return
statements within this function. Open
Open
return ii;
Avoid too many return
statements within this function. Open
Open
return ii;
Avoid too many return
statements within this function. Open
Open
return ii;
Avoid too many return
statements within this function. Open
Open
return ii !== -1 ? ii : null;
Avoid too many return
statements within this function. Open
Open
return ii !== -1 ? ii : null;
Avoid too many return
statements within this function. Open
Open
return i;
Avoid too many return
statements within this function. Open
Open
return ii;
Avoid too many return
statements within this function. Open
Open
return ii !== -1 ? ii : null;
Avoid too many return
statements within this function. Open
Open
return ii;