Skip to content

Commit

Permalink
woops
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Jun 30, 2021
1 parent df89410 commit 5d56e54
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions addon/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,14 @@ export function parseDate(date, format, locale) {
}
// TODO: check other formats of invalid string date - "23/01/2014"
return format
? new Date(date)
: new Intl.DateTimeFormat(locale, format).format();
? new Intl.DateTimeFormat(locale, format).format()
: new Date(date);
}

function isValidDate(d) {
return d instanceof Date && !isNaN(d);
}

// WIP naive implementation
// TODO: timezone beware
function isSame(date, comp) {
return date.getTime() === comp.getTime();
}
Expand Down

0 comments on commit 5d56e54

Please sign in to comment.