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 f611673 commit db76575Copy full SHA for db76575
1 file changed
src/calendar.mjs
@@ -14,9 +14,7 @@ export const getEventsFromCalendar = async url => {
14
/**
15
* @param {Date} start
16
*/
17
-export const getWeekBounds = (start = new Date()) => {
18
- start.setUTCHours(0, 0, 0, 0);
19
-
+export const getNextWeek = (start = new Date()) => {
20
const end = new Date(start);
21
end.setUTCDate(start.getUTCDate() + 7);
22
@@ -30,7 +28,7 @@ export const getWeekBounds = (start = new Date()) => {
30
28
* @returns {Promise<Date|null>} The date of the next meeting, or null if no meeting is found
31
29
32
export const findNextMeetingDate = async (allEvents, { properties }) => {
33
- const [weekStart, weekEnd] = getWeekBounds();
+ const [weekStart, weekEnd] = getNextWeek();
34
35
const filteredEvents = allEvents.filter(
36
event =>
0 commit comments