I have 7 different events per day and i want each events repeat twice or repeat every 12 hours perday
As you can see on my RRULE RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=10,22
I want to repeat each event per day twice which is 10:00am StartTime and EndTime 10:10pm and I want it to repeat the event maybe 10:00 pm to 10:10 pm.
When I import the ics file on google i cant see the 10:00 pm event. Anyone here tried to repeat the event every 12 hours per event?
This is my JS function to create and download ics file:
function downloadICSFile(calendarEvents) {
const calendarBody = calendarEvents
.map(event => {
const {
uid,
summary,
description,
location,
startDateTime,
endDateTime
} = event;
return `BEGIN:VEVENTrn` +
`UID:${uid}rn` +
`SUMMARY:${summary}rn` +
`DTSTAMP:${getCurrentDateTime()}rn` +
`DTSTART:${startDateTime}rn` +
`DTEND:${endDateTime}rn` +
`DESCRIPTION:${description}rn` +
`LOCATION:${location}rn` +
`END:VEVENTrn`;
})
.join('');
const icsFileContent = `BEGIN:VCALENDARrn` +
`VERSION:2.0rn` +
`CALSCALE:GREGORIANrn` +
`PRODID:-//ZContent.net//Zap Calendar 1.0//ENrn` +
`METHOD:PUBLISHrn` +
`${calendarBody}` +
`RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=10,22rn` +
`END:VCALENDARrn`;
console.log(icsFileContent);
const element = document.createElement('a');
element.setAttribute(
'href',
'data:text/calendar;charset=utf-8,' + encodeURIComponent(icsFileContent)
);
element.setAttribute('download', 'SevenDayProgram.ics');
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
**Output ICS file:
**
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//ZContent.net//Zap Calendar 1.0//EN
METHOD:PUBLISH
BEGIN:VEVENT
UID:iXW6N29mmJZaro3YqhSr0n
SUMMARY:Eat Banana
DTSTAMP:20230313T023413Z
DTSTART:20230308T020000Z
DTEND:20230308T021000Z
DESCRIPTION:Example event 1
LOCATION:
END:VEVENT
BEGIN:VEVENT
UID:GowEApFmJFDZsV7antQAK6
SUMMARY:Eat Apple
DTSTAMP:20230313T023413Z
DTSTART:20230309T020000Z
DTEND:20230309T021000Z
DESCRIPTION:Example event 1
LOCATION:
END:VEVENT
BEGIN:VEVENT
UID:V-sx_UGcq35CNTW3tWxmK-
SUMMARY:Eat Mango
DTSTAMP:20230313T023413Z
DTSTART:20230310T020000Z
DTEND:20230310T021000Z
DESCRIPTION:Example event 1
LOCATION:
END:VEVENT
BEGIN:VEVENT
UID:siCmwmobGdIShuexZPk0OL
SUMMARY:Eat Strawberry
DTSTAMP:20230313T023413Z
DTSTART:20230311T020000Z
DTEND:20230311T021000Z
DESCRIPTION:Example event 1
LOCATION:
END:VEVENT
BEGIN:VEVENT
UID:kgoUAa3rIAgpptWyNRAPOu
SUMMARY:Eat Watermelon
DTSTAMP:20230313T023413Z
DTSTART:20230312T020000Z
DTEND:20230312T021000Z
DESCRIPTION:Example event 1
LOCATION:
END:VEVENT
BEGIN:VEVENT
UID:kJb6oHgmm94JncGVXj96D4
SUMMARY:Eat Pineapple
DTSTAMP:20230313T023413Z
DTSTART:20230313T020000Z
DTEND:20230313T021000Z
DESCRIPTION:Example event 1
LOCATION:
END:VEVENT
BEGIN:VEVENT
UID:_uReNzwJi6AZUyz6-ERXvD
SUMMARY:Eat Lettuce
DTSTAMP:20230313T023413Z
DTSTART:20230314T020000Z
DTEND:20230314T021000Z
DESCRIPTION:Example event 1
LOCATION:
END:VEVENT
RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=10,22
END:VCALENDAR