问题
Google implements recurring patterns partly with rfc 5545. I need to map on Google situation of repeat event Yearly, every fourth Wednesday in August (start time mapping is clear).
Implementation language to describe rule is not important, but if someone can recommend existing solution it would be good if java library is used.
More details from rfc 5545 specification:
Every Wednesday in August, forever:
RRULE:FREQ=YEARLY;BYMONTH=8;BYDAY=WE
It provides only partly solution. Is it can be improved?
回答1:
Try this:
{
"summary": "Event every fourth Wednesday in August",
"recurrence": [
"RRULE:FREQ=YEARLY;BYMONTH=8;BYDAY=4WE;UNTIL=20191228"
],
"start": {
"dateTime": "2017-08-08T6:00:00",
"timeZone": "timeZone"
},
"end": {
"dateTime": "2017-08-08T7:00:00",
"timeZone": "timeZone"
}
}
This will make your even occur every year, 4th Wednesday of August.
Reference:
- Can I create a Google Calendar event that repeats at every 1st, 3rd and 5th Friday in the month?
- Recurring events
Hope this helps
来源:https://stackoverflow.com/questions/43786642/recurrent-pattern-to-map-on-google-event-pattern