Skip to content

Commit

Permalink
fix(dateTime): reexport helper funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
LamaEats committed Dec 19, 2023
1 parent 4017423 commit 8d526d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/dateTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export const dateAgo = (date: Date, pastDate: number, { locale }: LocaleArg): st
}
};

export const isPastDate = (date: Date): boolean => date < new Date();
export const isPastDate = (date: Date): boolean => new Date(date) < new Date();

export const incYearIfDateHasPassed = (date: Date): Date => {
if (isPastDate(date)) {
Expand Down

0 comments on commit 8d526d0

Please sign in to comment.