node_modules/botbuilder/node_modules/chrono-node/out.js
// date from string and array of format strings
date from string and array of format strings
date from string and array of format strings
function makeDateFromStringAndArray(config) {
	        var tempConfig,
	            bestMoment,
	            scoreToBeat,
	            i,
	            currentScore;
	        if (config._f.length === 0) {
	            config._pf.invalidFormat = true;
	            config._d = new Date(NaN);
	            return;
	        }
	        for (i = 0; i < config._f.length; i++) {
	            currentScore = 0;
	            tempConfig = copyConfig({}, config);
	            if (config._useUTC != null) {
	                tempConfig._useUTC = config._useUTC;
	            }
	            tempConfig._pf = defaultParsingFlags();
	            tempConfig._f = config._f[i];
	            makeDateFromStringAndFormat(tempConfig);
	            if (!isValid(tempConfig)) {
	                continue;
	            }
	            currentScore += tempConfig._pf.charsLeftOver;
	            currentScore += tempConfig._pf.unusedTokens.length * 10;
	            tempConfig._pf.score = currentScore;
	            if (scoreToBeat == null || currentScore < scoreToBeat) {
	                scoreToBeat = currentScore;
	                bestMoment = tempConfig;
	            }
	        }
	        extend(config, bestMoment || tempConfig);
	    }
function makeDateFromStringAndArray ( config ) { var tempConfig , bestMoment , scoreToBeat , i , currentScore ; if ( config . _f . length === 0 ) { config . _pf . invalidFormat = true ; config . _d = new Date ( NaN ) ; return ; } for ( i = 0 ; i < config . _f . length ; i ++ ) { currentScore = 0 ; tempConfig = copyConfig ( { } , config ) ; if ( config . _useUTC != null ) { tempConfig . _useUTC = config . _useUTC ; } tempConfig . _pf = defaultParsingFlags ( ) ; tempConfig . _f = config . _f [ i ] ; makeDateFromStringAndFormat ( tempConfig ) ; if ( ! isValid ( tempConfig ) ) { continue ; } currentScore += tempConfig . _pf . charsLeftOver ; currentScore += tempConfig . _pf . unusedTokens . length * 10 ; tempConfig . _pf . score = currentScore ; if ( scoreToBeat == null || currentScore < scoreToBeat ) { scoreToBeat = currentScore ; bestMoment = tempConfig ; } } extend ( config , bestMoment || tempConfig ) ; }
date from string and array of format strings
date from string and array of format strings
// if there is any input that was not parsed add a penalty for that format //or tokens