We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f662121 commit 890b555Copy full SHA for 890b555
apps/dashboard/src/utils/date-utils.ts
@@ -1,7 +1,5 @@
1
-import { differenceInDays } from "date-fns/differenceInDays";
2
import { format } from "date-fns/format";
3
import { isValid } from "date-fns/isValid";
4
-import { parseISO } from "date-fns/parseISO";
5
6
const DATE_TIME_LOCAL_FORMAT = "yyyy-MM-dd HH:mm";
7
@@ -18,12 +16,6 @@ export function toDateTimeLocal(date?: Date | number | string) {
18
16
: undefined;
19
17
}
20
21
-export function withinDays(dateISO: string, days: number) {
22
- const date = parseISO(dateISO);
23
- const today = new Date();
24
- return differenceInDays(today, date) <= days;
25
-}
26
-
27
export function remainingDays(isoDate: string) {
28
const currentDate = new Date();
29
const targetDate = new Date(isoDate);
0 commit comments