nl_tokens: date from string and format string
pl_tokens: function makeDateFromStringAndFormat ( config ) { // This array is used to make a Date, either with `new Date` or `Date.UTC` var tokens = config . _f . match ( formattingTokens ) , string = config . _i , i , parsedInput ; config . _a = [ ] ; for ( i = 0 ; i < tokens . length ; i ++ ) { parsedInput = ( getParseRegexForToken ( tokens [ i ] , config ) . exec ( string ) || [ ] ) [ 0 ] ; if ( parsedInput ) { string = string . slice ( string . indexOf ( parsedInput ) + parsedInput . length ) ; } // don't parse if its not a known token if ( formatTokenFunctions [ tokens [ i ] ] ) { addTimeToArrayFromToken ( tokens [ i ] , parsedInput , config ) ; } } // add remaining unparsed input to the string if ( <mask> ) { config . _il = string ; } // handle am pm if ( config . _isPm && config . _a [ 3 ] < 12 ) { config . _a [ 3 ] += 12 ; } // if is 12 am, change hours to 0 if ( config . _isPm === false && config . _a [ 3 ] === 12 ) { config . _a [ 3 ] = 0 ; } // return dateFromArray ( config ) ; }