Skip to content

Commit

Permalink
date changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bl20052005 committed Nov 2, 2024
1 parent 2307627 commit 694515b
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions apps/site/src/app/schedule/ScheduleTimer/ScheduleTimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,23 @@ const ScheduleTimer: React.FC<ScheduleProps> = ({ schedule }) => {

const scheduleFlat = schedule.flat();
const dayOne = scheduleFlat.filter(
(s) => s.startTime.getTime() < new Date("2024-11-02T00:00:00"),
(s) =>
s.startTime.getTime() <
new Date(new Date("2024-11-02T00:00:00").toUTCString()).getTime(),
);
const dayTwo = scheduleFlat.filter(
(s) =>
s.startTime.getTime() < new Date("2024-11-03T00:00:00") &&
s.startTime.getTime() > new Date("2024-11-02T00:00:00"),
s.startTime.getTime() <
new Date(new Date("2024-11-03T00:00:00").toUTCString()).getTime() &&
s.startTime.getTime() >
new Date(new Date("2024-11-02T00:00:00").toUTCString()).getTime(),
);
const dayThree = scheduleFlat.filter(
(s) =>
s.startTime.getTime() < new Date("2024-11-04T00:00:00") &&
s.startTime.getTime() > new Date("2024-11-03T00:00:00"),
s.startTime.getTime() <
new Date(new Date("2024-11-04T00:00:00").toUTCString()).getTime() &&
s.startTime.getTime() >
new Date(new Date("2024-11-03T00:00:00").toUTCString()).getTime(),
);

return (
Expand Down

0 comments on commit 694515b

Please sign in to comment.