-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
This bug stems from the intersection between PRs #203 and #177.
Summary
Creating meetings using days of the week internally utilizes anchor dates to standardize the order and interpretation of such days:
// chrono.ts
export const ANCHOR_DATES: Date[] = [
new Date(Date.UTC(2023, 0, 1)),
new Date(Date.UTC(2023, 0, 2)),
new Date(Date.UTC(2023, 0, 3)),
new Date(Date.UTC(2023, 0, 4)),
new Date(Date.UTC(2023, 0, 5)),
new Date(Date.UTC(2023, 0, 6)),
new Date(Date.UTC(2023, 0, 7)),
];
When Google Calendar events are requested for overlay on personal-availability.tsx, it will send the anchor dates instead of the current week, ultimately retrieving outdated information.
The probable solution is to convert the original day to the current week's counterpart, and use those dates in the API call. The returned data may need to be reconverted or interpreted to overlay back onto the original anchor dates, whether by date or day.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working