일정 시리즈의 반복 규칙을 나타냅니다.
이 클래스는 속한 EventRecurrence처럼 작동하므로 다음과 같이 규칙 생성을 연결할 수 있습니다.
const recurrence = CalendarApp.newRecurrence().addDailyRule().times(3).interval(2).addWeeklyExclusion().times(2);
times(times) 및 interval(interval)과 같은 수정자는 가장 최근에 추가된 규칙에 적용됩니다.메서드
자세한 문서
addDailyExclusion()
매일 어커런스를 제외하는 규칙을 추가합니다.
// Creates a rule that recurs every week after the first 30 days. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().addDailyExclusion().times(30);
리턴
RecurrenceRule - 새 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addDailyRule()
이벤트가 매일 반복되도록 하는 규칙을 추가합니다.
// Creates a rule that recurs every day for ten days. const recurrence = CalendarApp.newRecurrence().addDailyRule().times(10);
리턴
RecurrenceRule - 새 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addDate(date)
특정 날짜에 이벤트가 반복되도록 하는 규칙을 추가합니다.
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
date | Date |
리턴
EventRecurrence - 연결을 위한 이 EventRecurrence
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addDateExclusion(date)
특정 날짜의 일정을 제외하는 규칙을 추가합니다.
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
date | Date |
리턴
EventRecurrence - 연결을 위한 이 EventRecurrence
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addMonthlyExclusion()
월별 어커런스를 제외하는 규칙을 추가합니다.
기본적으로 제외는 시리즈의 첫 번째 이벤트와 동일한 날짜에 적용되지만 onlyOnMonthDay(day) 또는 onlyOnMonthDays(days)를 호출하여 변경할 수 있습니다.
리턴
RecurrenceRule - 새 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addMonthlyRule()
이벤트가 매월 반복되도록 하는 규칙을 추가합니다.
기본적으로 이벤트는 시리즈의 첫 번째 이벤트와 동일한 날짜에 반복되지만 onlyOnMonthDay(day) 또는 onlyOnMonthDays(days)를 호출하여 변경할 수 있습니다.
// Creates a rule that recurs every month for three months. const recurrence = CalendarApp.newRecurrence().addMonthlyRule().times(4);
리턴
RecurrenceRule - 새 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addWeeklyExclusion()
주 단위로 어커런스를 제외하는 규칙을 추가합니다.
기본적으로 제외는 시리즈의 첫 번째 일정과 동일한 요일에 적용되지만 onlyOnWeekday(day) 또는 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);
리턴
RecurrenceRule - 새 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addWeeklyRule()
이벤트가 매주 반복되도록 하는 규칙을 추가합니다.
기본적으로 이벤트는 시리즈의 첫 번째 이벤트와 동일한 요일에 반복되지만 onlyOnWeekday(day) 또는 onlyOnWeekdays(days)를 호출하여 변경할 수 있습니다.
// Creates a rule that recurs every week for ten weeks. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().times(10);
리턴
RecurrenceRule - 새 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addYearlyExclusion()
연간 기준으로 어커런스를 제외하는 규칙을 추가합니다.
기본적으로 제외는 시리즈의 첫 번째 이벤트와 동일한 날짜에 적용되지만 onlyOnYearDay(day) 또는 onlyOnYearDays(days)를 호출하여 변경할 수 있습니다.
리턴
RecurrenceRule - 새 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addYearlyRule()
이벤트가 매년 반복되도록 하는 규칙을 추가합니다.
기본적으로 이벤트는 시리즈의 첫 번째 이벤트와 동일한 날짜에 반복되지만 onlyOnYearDay(day) 또는 onlyOnYearDays(days)를 호출하여 변경할 수 있습니다.
리턴
RecurrenceRule - 새 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
interval(interval)
규칙의 시간 단위 중 이 간격에만 규칙이 적용되도록 구성합니다.
// Creates a rule that recurs every fourth week. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().interval(4);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
interval | Integer | 규칙의 시간 단위로 된 간격 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyInMonth(month)
특정 월에만 적용되도록 규칙을 구성합니다.
// Creates a rule that recurs every week in February. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().onlyInMonth( CalendarApp.Month.FEBRUARY);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
month | Month | 월 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyInMonths(months)
특정 월에만 적용되도록 규칙을 구성합니다.
// Creates a rule that recurs every week in February and March. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().onlyInMonths( [CalendarApp.Month.FEBRUARY, CalendarApp.Month.MARCH]);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
months | Month[] | 월 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyOnMonthDay(day)
특정 날짜에만 규칙이 적용되도록 구성합니다.
// Creates a rule that recurs every month on the fifth day of the month. const recurrence = CalendarApp.newRecurrence().addMonthlyRule().onlyOnMonthDay(5);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
day | Integer | 날짜 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyOnMonthDays(days)
특정 날짜에만 규칙이 적용되도록 구성합니다.
// Creates a rule that recurs every month on the first and fifteenth day of the // month. const recurrence = CalendarApp.newRecurrence().addMonthlyRule().onlyOnMonthDays([1, 15]);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
days | Integer[] | 월의 날짜 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyOnWeek(week)
특정 연도 주에만 적용되도록 규칙을 구성합니다.
// Creates a rule that recurs on the fifth week of every year. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().onlyOnWeek(5);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
week | Integer | 주 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyOnWeekday(day)
특정 요일에만 규칙이 적용되도록 구성합니다.
// Creates a rule that recurs every week on Wednesdays. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().onlyOnWeekday( CalendarApp.Weekday.WEDNESDAY);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
day | Weekday | 요일 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyOnWeekdays(days)
특정 요일에만 적용되도록 규칙을 구성합니다.
// Creates a rule that recurs every week on Tuesdays and Thursdays. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().onlyOnWeekdays( [CalendarApp.Weekday.TUESDAY, CalendarApp.Weekday.THURSDAY]);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
days | Weekday[] | 요일 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyOnWeeks(weeks)
특정 주에만 규칙이 적용되도록 구성합니다.
// Creates a rule that recurs on the fifth and tenth weeks of every year. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().onlyOnWeeks([5, 10]);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
weeks | Integer[] | 주 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyOnYearDay(day)
특정 날짜에만 규칙이 적용되도록 구성합니다.
// Creates a rule that recurs every year on February 15 (the 46th day). const recurrence = CalendarApp.newRecurrence().addYearlyRule().onlyOnYearDay(46);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
day | Integer | 연중 날짜 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
onlyOnYearDays(days)
특정 날짜에만 규칙이 적용되도록 구성합니다.
// Creates a rule that recurs every year on January 20 and February 15. const recurrence = CalendarApp.newRecurrence().addYearlyRule().onlyOnYearDay([20, 46]);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
days | Integer[] | 연중 날짜 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
setTimeZone(timeZone)
이 반복의 시간대를 설정합니다. 이는 이벤트가 반복되는 날짜와 시간, 이벤트가 일광 절약 시간제에 따라 변경되는지 여부에 영향을 미칩니다. 기본값은 캘린더의 시간대입니다.
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
time | String | 시간대('long' 형식으로 지정됨, 예: Joda.org에 나열된 'America/New_York') |
리턴
EventRecurrence - 연결을 위한 이 EventRecurrence
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
times(times)
지정된 횟수만큼 반복한 후 종료되도록 규칙을 구성합니다.
// Creates a rule that recurs every day for ten days. const recurrence = CalendarApp.newRecurrence().addDailyRule().times(10);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
times | Integer | 반복할 횟수 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
until(endDate)
지정된 날짜 (포함)에 종료되도록 규칙을 구성합니다.
// Creates a rule that recurs every day through the end of 2013. const recurrence = CalendarApp.newRecurrence().addDailyRule().until( new Date('December 31, 2013'));
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
end | Date |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상 또는 관련 REST API의 적절한 범위에 대한 승인이 필요합니다.
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
weekStartsOn(day)
규칙을 적용하기 위해 한 주가 시작되는 요일을 구성합니다.
// Creates a weekly rule where weeks start on Monday. const recurrence = CalendarApp.newRecurrence().addWeeklyRule().weekStartsOn( CalendarApp.Weekday.MONDAY);
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
day | Weekday | 한 주가 시작되는 요일 |
리턴
RecurrenceRule - 연결을 위한 이 RecurrenceRule