Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/360.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Python中从RRULE中查找频率?_Python_Python 2.7_Google Calendar Api_Icalendar_Rrule - Fatal编程技术网

如何在Python中从RRULE中查找频率?

如何在Python中从RRULE中查找频率?,python,python-2.7,google-calendar-api,icalendar,rrule,Python,Python 2.7,Google Calendar Api,Icalendar,Rrule,我试图从谷歌日历事件中找到日历事件的频率 我知道dateutil.rrule.rrulestr有一些方法可以解析rrule。但我不知道有什么方法可以返回事件的频率 任何帮助或指示都将不胜感激 您可以检查这个。创建定期事件类似于设置了的定期字段的常规事件 下面是一个使用RRULE的Python代码示例: event = { 'summary': 'Appointment', 'location': 'Somewhere', 'start': { 'dateTime': '201

我试图从谷歌日历事件中找到日历事件的频率

我知道
dateutil.rrule.rrulestr
有一些方法可以解析rrule。但我不知道有什么方法可以返回事件的频率

任何帮助或指示都将不胜感激

您可以检查这个。创建定期事件类似于设置了的定期字段的常规事件

下面是一个使用
RRULE
的Python代码示例:

event = {
  '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...
    },
    # ...
  ],
}

recurring_event = service.events().insert(calendarId='primary', body=event).execute()

print recurring_event['id']
有关更多信息,请查看此项