Skip to content

Commit

Permalink
fix: fromDateParam
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrobertbrooks committed Jun 27, 2024
1 parent 3138e5e commit b1daa63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const toDateParam = (date: Date) =>
new Date(date).toISOString().slice(0, 10); // YYYY-MM-DD

export const fromDateParam = (dateParam: string): Date => {
const date = new Date(dateParam);
const date = new Date(`${dateParam}T00:00:00`);
date.setHours(0, 0, 0, 0);
return date;
};

0 comments on commit b1daa63

Please sign in to comment.