lib/gcli/types/date.js
function toDate(str) {
  var millis = Date.parse(str);
  if (isNaN(millis)) {
    throw new Error(l10n.lookupFormat('typesDateNan', [ str ]));
  }
  return new Date(millis);
}
function toDate(str) {
  var millis = Date.parse(str);
  if (isNaN(millis)) {
    throw new Error(l10n.lookupFormat('typesDateNan', [ str ]));
  }
  return new Date(millis);
}
function toDate ( str ) { var millis = Date . parse ( str ) ; if ( isNaN ( millis ) ) { throw new Error ( l10n . lookupFormat ( 'typesDateNan' , [ str ] ) ) ; } return new Date ( millis ) ; }
Utility to convert a string to a date, throwing if the date can't be
parsed rather than having an invalid date
Utility to convert a string to a date throwing if the date can t be parsed rather than having an invalid date