(input, format, locale, strict, isUTC)
| 2991 | } |
| 2992 | |
| 2993 | function createLocalOrUTC(input, format, locale, strict, isUTC) { |
| 2994 | var c = {}; |
| 2995 | |
| 2996 | if (format === true || format === false) { |
| 2997 | strict = format; |
| 2998 | format = undefined; |
| 2999 | } |
| 3000 | |
| 3001 | if (locale === true || locale === false) { |
| 3002 | strict = locale; |
| 3003 | locale = undefined; |
| 3004 | } |
| 3005 | |
| 3006 | if ( |
| 3007 | (isObject(input) && isObjectEmpty(input)) || |
| 3008 | (isArray(input) && input.length === 0) |
| 3009 | ) { |
| 3010 | input = undefined; |
| 3011 | } |
| 3012 | // object construction must be done this way. |
| 3013 | // https://github.com/moment/moment/issues/1423 |
| 3014 | c._isAMomentObject = true; |
| 3015 | c._useUTC = c._isUTC = isUTC; |
| 3016 | c._l = locale; |
| 3017 | c._i = input; |
| 3018 | c._f = format; |
| 3019 | c._strict = strict; |
| 3020 | |
| 3021 | return createFromConfig(c); |
| 3022 | } |
| 3023 | |
| 3024 | function createLocal(input, format, locale, strict) { |
| 3025 | return createLocalOrUTC(input, format, locale, strict, false); |
no test coverage detected