How can an ICS file be written for a recurring event?

前端 未结 1 1610

I want to create an ICS file that describes a recurring event, an event that takes place every Monday from 13:00 to 14:00 UTC for all of 2016. The ICS file should be importa

相关标签:
1条回答
  • 2021-01-04 11:17

    You will need to add an RRULE property to the event. For a repeating Monday event for 2016, you will need to have lines like this in your event:

    DTSTART:20160104T130000Z

    DTEND:20160104T140000Z

    RRULE:FREQ=WEEKLY;UNTIL=20170101T000000Z

    You can find the details about the RRULE syntax here: http://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html

    You may also find it useful to validate your icalendar feed during testing to ensure Google Calendar won't have an issue with it. Here is a useful validation tool: http://icalendar.org/validator.html

    Disclaimer: I think the icalendar validator tool is the best on the internet, but I also wrote it :-)

    0 讨论(0)
提交回复
热议问题