Lines Matching full:input

25 function isArray(input) {  argument
26 return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; argument
29 function isObject(input) { argument
31 // input != null
32 return input != null && Object.prototype.toString.call(input) === '[object Object]';
49 function isUndefined(input) { argument
50 return input === void 0;
53 function isNumber(input) { argument
54 return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
57 function isDate(input) { argument
58 return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; argument
91 function createUTC (input, format, locale, strict) { argument
92 return createLocalOrUTC(input, format, locale, strict, true).utc();
346 function isFunction(input) { argument
347 … return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; argument
584 function removeFormattingTokens(input) { argument
585 if (input.match(/\[[\s\S]/)) {
586 return input.replace(/^\[|\]$/g, '');
588 return input.replace(/\\/g, '');
626 function replaceLongDateFormatTokens(input) { argument
627 return locale.longDateFormat(input) || input;
700 func = function (input, array) { argument
701 array[callback] = toInt(input);
710 addParseToken(token, function (input, array, config, token) { argument
712 callback(input, config._w, config, token);
716 function addTimeToArrayFromToken(token, input, config) { argument
717 if (input != null && hasOwnProp(tokens, token)) {
718 tokens[token](input, config._a, config, token);
764 addParseToken('YYYY', function (input, array) { argument
765 array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
767 addParseToken('YY', function (input, array) { argument
768 array[YEAR] = hooks.parseTwoDigitYear(input);
770 addParseToken('Y', function (input, array) { argument
771 array[YEAR] = parseInt(input, 10);
786 hooks.parseTwoDigitYear = function (input) { argument
787 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
916 addParseToken(['M', 'MM'], function (input, array) { argument
917 array[MONTH] = toInt(input) - 1;
920 addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { argument
921 var month = config._locale.monthsParse(input, token, config._strict);
926 getParsingFlags(config).invalidMonth = input;
1253 addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { argument
1254 week[token.substr(0, 1)] = toInt(input);
1280 function getSetWeek (input) { argument
1282 return input == null ? week : this.add((input - week) * 7, 'd');
1285 function getSetISOWeek (input) { argument
1287 return input == null ? week : this.add((input - week) * 7, 'd');
1335 addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { argument
1336 var weekday = config._locale.weekdaysParse(input, token, config._strict);
1341 getParsingFlags(config).invalidWeekday = input;
1345 addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { argument
1346 week[token] = toInt(input);
1351 function parseWeekday(input, locale) { argument
1352 if (typeof input !== 'string') {
1353 return input;
1356 if (!isNaN(input)) {
1357 return parseInt(input, 10);
1360 input = locale.weekdaysParse(input);
1361 if (typeof input === 'number') {
1362 return input;
1368 function parseIsoWeekday(input, locale) { argument
1369 if (typeof input === 'string') {
1370 return locale.weekdaysParse(input) % 7 || 7;
1372 return isNaN(input) ? null : input;
1503 function getSetDayOfWeek (input) { argument
1505 return input != null ? this : NaN;
1508 if (input != null) {
1509 input = parseWeekday(input, this.localeData());
1510 return this.add(input - day, 'd');
1516 function getSetLocaleDayOfWeek (input) { argument
1518 return input != null ? this : NaN;
1521 return input == null ? weekday : this.add(input - weekday, 'd');
1524 function getSetISODayOfWeek (input) { argument
1526 return input != null ? this : NaN;
1533 if (input != null) {
1534 var weekday = parseIsoWeekday(input, this.localeData());
1712 addParseToken(['k', 'kk'], function (input, array, config) { argument
1713 var kInput = toInt(input);
1716 addParseToken(['a', 'A'], function (input, array, config) { argument
1717 config._isPm = config._locale.isPM(input);
1718 config._meridiem = input;
1720 addParseToken(['h', 'hh'], function (input, array, config) { argument
1721 array[HOUR] = toInt(input);
1724 addParseToken('hmm', function (input, array, config) { argument
1725 var pos = input.length - 2;
1726 array[HOUR] = toInt(input.substr(0, pos));
1727 array[MINUTE] = toInt(input.substr(pos));
1730 addParseToken('hmmss', function (input, array, config) { argument
1731 var pos1 = input.length - 4;
1732 var pos2 = input.length - 2;
1733 array[HOUR] = toInt(input.substr(0, pos1));
1734 array[MINUTE] = toInt(input.substr(pos1, 2));
1735 array[SECOND] = toInt(input.substr(pos2));
1738 addParseToken('Hmm', function (input, array, config) { argument
1739 var pos = input.length - 2;
1740 array[HOUR] = toInt(input.substr(0, pos));
1741 array[MINUTE] = toInt(input.substr(pos));
1743 addParseToken('Hmmss', function (input, array, config) { argument
1744 var pos1 = input.length - 4;
1745 var pos2 = input.length - 2;
1746 array[HOUR] = toInt(input.substr(0, pos1));
1747 array[MINUTE] = toInt(input.substr(pos1, 2));
1748 array[SECOND] = toInt(input.substr(pos2));
1753 function localeIsPM (input) { argument
1756 return ((input + '').toLowerCase().charAt(0) === 'p');
2032 var i, date, input = [], currentDate, expectedWeekday, yearToUse;
2064 config._a[i] = input[i] = currentDate[i];
2069 config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
2081 config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
2084 // Apply timezone offset from input. The actual utcOffset can be changed
2365 // Final attempt, use Input Fallback
2435 // add remaining unparsed input length to the string
2511 // if there is any input that was not parsed add a penalty for that format
2553 var input = config._i,
2558 if (input === null || (format === undefined && input === '')) {
2562 if (typeof input === 'string') {
2563 config._i = input = config._locale.preparse(input);
2566 if (isMoment(input)) {
2567 return new Moment(checkOverflow(input));
2568 } else if (isDate(input)) {
2569 config._d = input;
2586 var input = config._i;
2587 if (isUndefined(input)) {
2589 } else if (isDate(input)) {
2590 config._d = new Date(input.valueOf());
2591 } else if (typeof input === 'string') {
2593 } else if (isArray(input)) {
2594 config._a = map(input.slice(0), function (obj) {
2598 } else if (isObject(input)) {
2600 } else if (isNumber(input)) {
2602 config._d = new Date(input);
2608 function createLocalOrUTC (input, format, locale, strict, isUTC) { argument
2616 if ((isObject(input) && isObjectEmpty(input)) ||
2617 (isArray(input) && input.length === 0)) {
2618 input = undefined;
2625 c._i = input;
2632 function createLocal (input, format, locale, strict) { argument
2633 return createLocalOrUTC(input, format, locale, strict, false);
2801 addParseToken(['Z', 'ZZ'], function (input, array, config) { argument
2803 config._tzm = offsetFromString(matchShortOffset, input);
2829 // Return a moment from input, that is local/utc/zone equivalent to model.
2830 function cloneWithOffset(input, model) { argument
2834 …diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.v…
2840 return createLocal(input).local();
2868 function getSetOffset (input, keepLocalTime, keepMinutes) { argument
2872 return input != null ? this : NaN;
2874 if (input != null) {
2875 if (typeof input === 'string') {
2876 input = offsetFromString(matchShortOffset, input);
2877 if (input === null) {
2880 } else if (Math.abs(input) < 16 && !keepMinutes) {
2881 input = input * 60;
2886 this._offset = input;
2891 if (offset !== input) {
2893 addSubtract(this, createDuration(input - offset, 'm'), 1, false);
2906 function getSetZone (input, keepLocalTime) { argument
2907 if (input != null) {
2908 if (typeof input !== 'string') {
2909 input = -input;
2912 this.utcOffset(input, keepLocalTime);
2951 function hasAlignedHourOffset (input) { argument
2955 input = input ? createLocal(input).utcOffset() : 0;
2957 return (this.utcOffset() - input) % 60 === 0;
3008 function createDuration (input, key) { argument
3009 var duration = input,
3016 if (isDuration(input)) {
3018 ms : input._milliseconds,
3019 d : input._days,
3020 M : input._months
3022 } else if (isNumber(input)) {
3025 duration[key] = input;
3027 duration.milliseconds = input;
3029 } else if (!!(match = aspNetRegex.exec(input))) {
3039 } else if (!!(match = isoRegex.exec(input))) {
3062 if (isDuration(input) && hasOwnProp(input, '_locale')) {
3063 ret._locale = input._locale;
3186 function isAfter (input, units) { argument
3187 var localInput = isMoment(input) ? input : createLocal(input);
3199 function isBefore (input, units) { argument
3200 var localInput = isMoment(input) ? input : createLocal(input);
3218 function isSame (input, units) { argument
3219 var localInput = isMoment(input) ? input : createLocal(input),
3233 function isSameOrAfter (input, units) { argument
3234 return this.isSame(input, units) || this.isAfter(input,units);
3237 function isSameOrBefore (input, units) { argument
3238 return this.isSame(input, units) || this.isBefore(input,units);
3241 function diff (input, units, asFloat) { argument
3250 that = cloneWithOffset(input, this);
3522 input: this._i,
3571 addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { argument
3572 week[token.substr(0, 2)] = toInt(input);
3575 addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { argument
3576 week[token] = hooks.parseTwoDigitYear(input);
3581 function getSetWeekYear (input) { argument
3583 input,
3590 function getSetISOWeekYear (input) { argument
3592 input, this.isoWeek(), this.isoWeekday(), 1, 4);
3604 function getSetWeekYearHelper(input, week, weekday, dow, doy) { argument
3606 if (input == null) {
3609 weeksTarget = weeksInYear(input, dow, doy);
3613 return setWeekAll.call(this, input, week, weekday, dow, doy);
3642 addParseToken('Q', function (input, array) { argument
3643 array[MONTH] = (toInt(input) - 1) * 3;
3648 function getSetQuarter (input) { argument
3649 …return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month…
3675 addParseToken('Do', function (input, array) { argument
3676 array[DATE] = toInt(input.match(match1to2)[0]);
3698 addParseToken(['DDD', 'DDDD'], function (input, array, config) { argument
3699 config._dayOfYear = toInt(input);
3706 function getSetDayOfYear (input) { argument
3708 return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
3805 function parseMs(input, array) { argument
3806 array[MILLISECOND] = toInt(('0.' + input) * 1000);
3935 function createUnix (input) { argument
3936 return createLocal(input * 1000);
4110 function addSubtract$1 (duration, input, value, direction) { argument
4111 var other = createDuration(input, value);
4121 function add$1 (input, value) { argument
4122 return addSubtract$1(this, input, value, 1);
4126 function subtract$1 (input, value) { argument
4127 return addSubtract$1(this, input, value, -1);
4478 addParseToken('X', function (input, array, config) { argument
4479 config._d = new Date(parseFloat(input, 10) * 1000);
4481 addParseToken('x', function (input, array, config) { argument
4482 config._d = new Date(toInt(input));
4520 // currently HTML5 input type only supports 24-hour formats
4522 DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
4523 DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
4524 DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
4525 DATE: 'YYYY-MM-DD', // <input type="date" />
4526 TIME: 'HH:mm', // <input type="time" />
4527 TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
4528 TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
4529 WEEK: 'YYYY-[W]WW', // <input type="week" />
4530 MONTH: 'YYYY-MM' // <input type="month" />