Recurrent pattern to map on Google event pattern

a 夏天 提交于 2020-01-06 17:58:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!