Skip to content

Commit e36924f

Browse files
committed
fix: day offset error
1 parent dd05bae commit e36924f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/hooks/calendar.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import fetch from "node-fetch";
33
import cron from "node-cron";
44
import { config } from "../config";
55
import he from "he";
6-
import RRule from "rrule";
76

87
// Google Calendar Props Interface
98
interface GoogleCalendarProps {
@@ -73,7 +72,6 @@ function isSameDay(date1: Date, date2: Date, event?: string): boolean {
7372
new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
7473

7574
const d1 = normalizeDate(date1);
76-
d1.setDate(d1.getDate() + 1);
7775
const d2 = normalizeDate(date2);
7876

7977
const result = d1.getTime() === d2.getTime();
@@ -272,7 +270,7 @@ export async function execute() {
272270
}
273271

274272
// Sort events by range, today -> tomorrow -> next week
275-
events.sort((a, b) => {
273+
events.sort((a) => {
276274
if (a.range === "Today") {
277275
return -1;
278276
} else if (a.range === "Tomorrow") {

0 commit comments

Comments
 (0)