[英]Why is this Google Calendar Event format invalid?
I'm using a Google Chrome extension to add events to Google Calendar. 我正在使用Google Chrome扩展程序将事件添加到Google日历。 This is the format of a sample event:
这是示例事件的格式:
{
"summary": "CS XXXXX LE1",
"location": "XXXXX Hall 210",
"description": "XXXXXX Systems\nInstructor: XXXXXX",
"start": {
"dateTime": "2018-01-08T08:30:00-05:00",
"timeZone": "America/New_York"
},
"originalStartTime": {
"dateTime": "2018-01-08T08:30:00-05:00",
"timeZone": "America/New_York"
},
"end": {
"dateTime": "2018-01-08T09:20:00-05:00",
"timeZone": "America/New_York"
},
"recurrence": [
"RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;INTERVAL=1;UNTIL=2018-04-28T04:00:00.000Z"
]
}
This is supposed to create an 8:30-9:20 AM class repeating on Monday, Wednesday and Friday, starting from Jan 08 to April 28. However, it's only creating the event for Jan 08, and not the specified period. 这应该创建一个8:30-9:20 AM班级,该班级从1月8日到4月28日在星期一,星期三和星期五重复。但是,它仅创建1月08日的事件,而不是指定的时间段。 What's going wrong here?
这是怎么了 I am following the recommended format .
我遵循推荐的格式 。
When I manually create this event in Google Calendar and fetch the data programmatically, I'm getting the following recurrence string: 当我在Google日历中手动创建此事件并以编程方式获取数据时,我得到了以下重复字符串:
"RRULE:FREQ=WEEKLY;UNTIL=20180428T035959Z;BYDAY=MO,WE,FR"
But, when I use that same string to create the event, it creates it for only the first Monday (Jan 08). 但是,当我使用相同的字符串创建事件时,它仅在第一个星期一(1月8日)创建事件。 I'm at a complete loss.
我完全不知所措。
Check the Creating recurring events : 检查创建重复事件 :
The correct format would be: 正确的格式为:
}
"summary": "Appointment",
"location": "Somewhere",
"start": {
"dateTime": "2011-06-03T10:00:00.000-07:00",
"timeZone": "America/Los_Angeles"
},
"end": {
"dateTime": "2011-06-03T10:25:00.000-07:00",
"timeZone": "America/Los_Angeles"
},
"recurrence": [
"RRULE:FREQ=WEEKLY;UNTIL=20110701T170000Z",
],
"attendees": [
{
"email": "attendeeEmail",
# Other attendee's data...
},
# ...
],
}
However, looking at your sample, you have extra details. 但是,查看您的样本,您会得到更多详细信息。 Follow the official sample first.
首先遵循官方样本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.