Stay organized with collections Save and categorize content based on your preferences.
EventRecurrenceRepresents the recurrence settings for an event series.
Detailed documentationaddDailyExclusion()
Adds a rule that excludes occurrences on a daily basis.
// Creates a rule that recurs every week after the first 30 days. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().addDailyExclusion().times(30);Return
RecurrenceRule
— the new RecurrenceRule
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addDailyRule()
Adds a rule that causes the event to recur on a daily basis.
// Creates a rule that recurs every day for ten days. const recurrence = CalendarApp.newRecurrence().addDailyRule().times(10);Return
RecurrenceRule
— the new RecurrenceRule
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addDate(date)
Adds a rule that causes the event to recur on a specific date.
Parameters Name Type Descriptiondate
Date
Return
EventRecurrence
— this EventRecurrence for chaining
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addDateExclusion(date)
Adds a rule that excludes an occurrence for a specific date.
Parameters Name Type Descriptiondate
Date
Return
EventRecurrence
— this EventRecurrence for chaining
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addMonthlyExclusion()
Adds a rule that excludes occurrences on a monthly basis.
By default the exclusion is applied on the same day of the month as the first event in the series, but this can be altered by calling RecurrenceRule.onlyOnMonthDay(day)
or RecurrenceRule.onlyOnMonthDays(days)
.
RecurrenceRule
— the new RecurrenceRule
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addMonthlyRule()
Adds a rule that causes the event to recur on a monthly basis.
By default the event recurs on the same day of the month as the first event in the series, but this can be altered by calling RecurrenceRule.onlyOnMonthDay(day)
or RecurrenceRule.onlyOnMonthDays(days)
.
// Creates a rule that recurs every month for three months. const recurrence = CalendarApp.newRecurrence().addMonthlyRule().times(4);Return
RecurrenceRule
— the new RecurrenceRule
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addWeeklyExclusion()
Adds a rule that excludes occurrences on a weekly basis.
By default the exclusion is applied on the same day of the week as the first event in the series, but this can be altered by calling RecurrenceRule.onlyOnWeekday(day)
or RecurrenceRule.onlyOnWeekdays(days)
.
// Creates a rule that recurs every day except the first four Wednesdays. const recurrence = CalendarApp.newRecurrence() .addDailyRule() .addWeeklyExclusion() .onlyOnWeekday(CalendarApp.Weekday.WEDNESDAY) .times(4);Return
RecurrenceRule
— the new RecurrenceRule
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addWeeklyRule()
Adds a rule that causes the event to recur on a weekly basis.
By default the event recurs on the same day of the week as the first event in the series, but this can be altered by calling RecurrenceRule.onlyOnWeekday(day)
or RecurrenceRule.onlyOnWeekdays(days)
.
// Creates a rule that recurs every week for ten weeks. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().times(10);Return
RecurrenceRule
— the new RecurrenceRule
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addYearlyExclusion()
Adds a rule that excludes occurrences on a yearly basis.
By default the exclusion is applied on the same day of the year as the first event in the series, but this can be altered by calling RecurrenceRule.onlyOnYearDay(day)
or RecurrenceRule.onlyOnYearDays(days)
.
RecurrenceRule
— the new RecurrenceRule
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
addYearlyRule()
Adds a rule that causes the event to recur on a yearly basis.
By default the event recurs on the same day of the year as the first event in the series, but this can be altered by calling RecurrenceRule.onlyOnYearDay(day)
or RecurrenceRule.onlyOnYearDays(days)
.
RecurrenceRule
— the new RecurrenceRule
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
setTimeZone(timeZone)
Sets the time zone for this recurrence. This affects the date and time that events recur on, and whether the event shifts with daylight savings time. Defaults to the calendar's time zone.
Parameters Name Type DescriptiontimeZone
String
the time zone, specified in "long" format (e.g., 'America/New_York', as listed by Joda.org) Return
EventRecurrence
— this EventRecurrence for chaining
Scripts that use this method require authorization with one or more of the following scopes or appropriate scopes from the related REST API:
https://www.googleapis.com/auth/calendar
https://www.google.com/calendar/feeds
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-03 UTC."],[[["`EventRecurrence` allows you to define how an event series repeats over time, such as daily, weekly, monthly, or yearly."],["You can set specific rules for recurrence, including exclusions for certain dates or days."],["`EventRecurrence` provides methods to control the frequency, duration, and time zone of the recurrence pattern."],["Recurrence rules can be customized further by specifying conditions like \"only on weekdays\" or \"only on month days\"."],["Using `EventRecurrence`, you can automate the creation of recurring events in Google Calendar, simplifying scheduling tasks."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4