How to Exclude a particular Date while creating a

2019-06-14 15:45发布

问题:

I want to Create a recurring Ical Event in Outlook and I have used RRule please see below

RRULE;BYDAY=SU;WKST=MO:FREQ=MONTHLY;INTERVAL=1;UNTIL=20151204T110000

So above will make an event every 04th of month until December 2015

Now in Outlook calendar I dont want to create event on October 4th.

Say like it is a recurring event from September to December on 4th Date, But I dont want event to be cerated in October.

How to achieve this? Can we exclude any date while making recurring event/ any other value we need to add in RRULE?

Your help is much appreciated. Please see below .ics file

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH

BEGIN:VEVENT
DTSTART:20150904T100000
DTEND:20151204T110000
DTSTAMP:20150904T012650Z
RRULE;BYDAY=SU;WKST=MO:FREQ=MONTHLY;INTERVAL=1;UNTIL=20151204T110000 
UID:77744@dev.local
Location:AP Test
DESCRIPTION:Test,\n\nThank you for making an appointment with us. You are confirmed for the following appointment:\n\n\nDate: Friday, December 4, 2015\nTime: 10:00am to 11:00am \nWith: AP Test\n\n\n
LAST-MODIFIED:20150904T012650Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:AP Test - test service
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

回答1:

You want to use an EXDATE property for each of the dates that you want to exclude. See http://tools.ietf.org/html/rfc5545#section-3.8.5.1



回答2:

I fixed it using below ics code:

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH

BEGIN:VEVENT
DTSTART:20150909T120000
DTSTAMP:20150909T020511Z
RRULE;BYDAY=SU;WKST=MO:FREQ=DAILY;INTERVAL=1;UNTIL=20150914T130000
EXDATE:20150912T120000, 20150913T120000
UID:77882@vchidura.dev.local
Location:Test
DESCRIPTION:Test,\n\nThank you for making an appointment with us. You are confirmed for the following appointment:\n
LAST-MODIFIED:20150909T020511Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY: test service
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Below link explains well..

http://www.tutorialsbag.com/2015/09/ical-recurring-appointment-with-rrule.html