Skip to content

Commit 339e6e4

Browse files
🐛 missing RRULE prefix for google (#489)
1 parent e33957f commit 339e6e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/index.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe("Calendar Links", () => {
7979
const eTime = dayjs(event.start).add(2, "hour").utc().format(TimeFormats.dateTimeUTC);
8080
const expectedDates = encodeURIComponent(`${sTime}/${eTime}`);
8181
expect(link).toBe(
82-
`https://calendar.google.com/calendar/render?action=TEMPLATE&dates=${expectedDates}&recur=FREQ%3DYEARLY%3BINTERVAL%3D1&text=Birthday%20party`
82+
`https://calendar.google.com/calendar/render?action=TEMPLATE&dates=${expectedDates}&recur=RRULE%3AFREQ%3DYEARLY%3BINTERVAL%3D1&text=Birthday%20party`
8383
);
8484
});
8585

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const google = (calendarEvent: CalendarEvent): string => {
4848
location: event.location,
4949
trp: event.busy,
5050
dates: start + "/" + end,
51-
recur: event.rRule,
51+
recur: event.rRule ? "RRULE:" + event.rRule : undefined,
5252
};
5353
if (event.guests && event.guests.length) {
5454
details.add = event.guests.join();

0 commit comments

Comments
 (0)