dist/ubique.js
// function to convert string input to date
function to convert string input to date
function to convert string input to date
function addTimeToArrayFromToken(token, input, config) {
	        var a, datePartArray = config._a;
	        switch (token) {
	        case 'Q':
	            if (input != null) {
	                datePartArray[MONTH] = (toInt(input) - 1) * 3;
	            }
	            break;
	        case 'M' : 
	        case 'MM' :
	            if (input != null) {
	                datePartArray[MONTH] = toInt(input) - 1;
	            }
	            break;
	        case 'MMM' : MM
	        case 'MMMM' :
	            a = config._locale.monthsParse(input, token, config._strict);
	            if (a != null) {
	                datePartArray[MONTH] = a;
	            } else {
	                config._pf.invalidMonth = input;
	            }
	            break;
	        case 'D' : 
	        case 'DD' :
	            if (input != null) {
	                datePartArray[DATE] = toInt(input);
	            }
	            break;
	        case 'Do' :
	            if (input != null) {
	                datePartArray[DATE] = toInt(parseInt(
	                            input.match(/\d{1,2}/)[0], 10));
	            }
	            break;
	        case 'DDD' : DD
	        case 'DDDD' :
	            if (input != null) {
	                config._dayOfYear = toInt(input);
	            }
	            break;
	        case 'YY' :
	            datePartArray[YEAR] = moment.parseTwoDigitYear(input);
	            break;
	        case 'YYYY' :
	        case 'YYYYY' :
	        case 'YYYYYY' :
	            datePartArray[YEAR] = toInt(input);
	            break;
	        case 'a' : 
	        case 'A' :
	            config._meridiem = input;
	            break;
	        case 'h' : 
	        case 'hh' :
	            config._pf.bigHour = true;
	        case 'H' : 
	        case 'HH' :
	            datePartArray[HOUR] = toInt(input);
	            break;
	        case 'm' : 
	        case 'mm' :
	            datePartArray[MINUTE] = toInt(input);
	            break;
	        case 's' : 
	        case 'ss' :
	            datePartArray[SECOND] = toInt(input);
	            break;
	        case 'S' :
	        case 'SS' :
	        case 'SSS' :
	        case 'SSSS' :
	            datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);
	            break;
	        case 'x':
	            config._d = new Date(toInt(input));
	            break;
	        case 'X':
	            config._d = new Date(parseFloat(input) * 1000);
	            break;
	        case 'Z' : 
	        case 'ZZ' :
	            config._useUTC = true;
	            config._tzm = utcOffsetFromString(input);
	            break;
	        case 'dd':
	        case 'ddd':
	        case 'dddd':
	            a = config._locale.weekdaysParse(input);
	            if (a != null) {
	                config._w = config._w || {};
	                config._w['d'] = a;
	            } else {
	                config._pf.invalidWeekday = input;
	            }
	            break;
	        case 'w':
	        case 'ww':
	        case 'W':
	        case 'WW':
	        case 'd':
	        case 'e':
	        case 'E':
	            token = token.substr(0, 1);
	        case 'gggg':
	        case 'GGGG':
	        case 'GGGGG':
	            token = token.substr(0, 2);
	            if (input) {
	                config._w = config._w || {};
	                config._w[token] = toInt(input);
	            }
	            break;
	        case 'gg':
	        case 'GG':
	            config._w = config._w || {};
	            config._w[token] = moment.parseTwoDigitYear(input);
	        }
	    }
function addTimeToArrayFromToken ( token , input , config ) { var a , datePartArray = config . _a ; switch ( token ) { case 'Q' : if ( input != null ) { datePartArray [ MONTH ] = ( toInt ( input ) - 1 ) * 3 ; } break ; case 'M' : case 'MM' : if ( input != null ) { datePartArray [ MONTH ] = toInt ( input ) - 1 ; } break ; case 'MMM' : case 'MMMM' : a = config . _locale . monthsParse ( input , token , config . _strict ) ; if ( a != null ) { datePartArray [ MONTH ] = a ; } else { config . _pf . invalidMonth = input ; } break ; case 'D' : case 'DD' : if ( input != null ) { datePartArray [ DATE ] = toInt ( input ) ; } break ; case 'Do' : if ( input != null ) { datePartArray [ DATE ] = toInt ( parseInt ( input . match ( / \d{1,2} / ) [ 0 ] , 10 ) ) ; } break ; case 'DDD' : case 'DDDD' : if ( input != null ) { config . _dayOfYear = toInt ( input ) ; } break ; case 'YY' : datePartArray [ YEAR ] = moment . parseTwoDigitYear ( input ) ; break ; case 'YYYY' : case 'YYYYY' : case 'YYYYYY' : datePartArray [ YEAR ] = toInt ( input ) ; break ; case 'a' : case 'A' : config . _meridiem = input ; break ; case 'h' : case 'hh' : config . _pf . bigHour = true ; case 'H' : case 'HH' : datePartArray [ HOUR ] = toInt ( input ) ; break ; case 'm' : case 'mm' : datePartArray [ MINUTE ] = toInt ( input ) ; break ; case 's' : case 'ss' : datePartArray [ SECOND ] = toInt ( input ) ; break ; case 'S' : case 'SS' : case 'SSS' : case 'SSSS' : datePartArray [ MILLISECOND ] = toInt ( ( '0.' + input ) * 1000 ) ; break ; case 'x' : config . _d = new Date ( toInt ( input ) ) ; break ; case 'X' : config . _d = new Date ( parseFloat ( input ) * 1000 ) ; break ; case 'Z' : case 'ZZ' : config . _useUTC = true ; config . _tzm = utcOffsetFromString ( input ) ; break ; case 'dd' : case 'ddd' : case 'dddd' : a = config . _locale . weekdaysParse ( input ) ; if ( a != null ) { config . _w = config . _w || { } ; config . _w [ 'd' ] = a ; } else { config . _pf . invalidWeekday = input ; } break ; case 'w' : case 'ww' : case 'W' : case 'WW' : case 'd' : case 'e' : case 'E' : token = token . substr ( 0 , 1 ) ; case 'gggg' : case 'GGGG' : case 'GGGGG' : token = token . substr ( 0 , 2 ) ; if ( input ) { config . _w = config . _w || { } ; config . _w [ token ] = toInt ( input ) ; } break ; case 'gg' : case 'GG' : config . _w = config . _w || { } ; config . _w [ token ] = moment . parseTwoDigitYear ( input ) ; } }
function to convert string input to date
function to convert string input to date
// QUARTER // MONTH // fall through to MM // fall through to MMMM // if we didn't find a month name, mark the date as invalid. // DAY OF MONTH // fall through to DD // DAY OF YEAR // fall through to DDDD // YEAR // AM / PM // fall through to A // config._isPm = config._locale.isPM(input); // HOUR // fall through to hh /* falls through */ // fall through to HH // MINUTE // fall through to mm // SECOND // fall through to ss // MILLISECOND // UNIX OFFSET (MILLISECONDS) // UNIX TIMESTAMP WITH MS // TIMEZONE // fall through to ZZ // WEEKDAY - human // if we didn't get a weekday name, mark the date as invalid // WEEK, WEEK DAY - numeric /* falls through */