modifiers.js
function date(value) {
  var parsedDate = Date.parse(value);

  // couldn't parse it
  if (typeOf(parsedDate) != 'number') {
    return throwModifierError('date', value, {message: 'Invalid Date'});
  }

  return new Date(parsedDate);
}
function date(value) {
  var parsedDate = Date.parse(value);

  // couldn't parse it
  if (typeOf(parsedDate) != 'number') {
    return throwModifierError('date', value, {message: 'Invalid Date'});
  }

  return new Date(parsedDate);
}
function date ( value ) { var parsedDate = Date . parse ( value ) ; // couldn't parse it if ( typeOf ( parsedDate ) != 'number' ) { return throwModifierError ( 'date' , value , { message : 'Invalid Date' } ) ; } return new Date ( parsedDate ) ; }
Parses provided string as a Date string

@param   {string} value - Date string to parse
@returns {Date} - Date object representaion of the provided string
Parses provided string as a Date string