calendar.holiday: Add specific holiday to a calendar

View source: R/calendars.R

calendar.holidayR Documentation

Add specific holiday to a calendar

Description

Add specific holiday to a calendar

Usage

calendar.holiday(
  calendar,
  event,
  offset = 0,
  weight = 1,
  start = NULL,
  end = NULL
)

Arguments

calendar

The calendar.

event

the event to add (see details).

offset

The position of the holiday in relation to the selected pre-specified holiday measured in days (can be positive or negative). By default offset = 0.

weight

weight associated to the holiday.

start, end

Validity period of the holiday in the format "YYYY-MM-DD".

Details

Possible values :

NEWYEAR Fixed holiday, falls on January, 1.
SHROVEMONDAY Moving holiday, falls on Monday before Ash Wednesday (48 days before Easter Sunday).
SHROVETUESDAY Moving holiday, falls on Tuesday before Ash Wednesday (47 days before Easter Sunday).
ASHWEDNESDAY Moving holiday, occurring 46 days before Easter Sunday.
MAUNDYTHURSDAY Moving holiday, falls on the Thursday before Easter.
GOODFRIDAY Moving holiday, falls on the Friday before Easter.
EASTER Moving holiday, varies between March, 22 and April, 25.
EASTERMONDAY Moving holiday, falls on the day after Easter.
ASCENSION Moving holiday, celebrated on Thursday, 39 days after Easter.
PENTECOST Moving holiday, celebrated 49 days after Easter Sunday.
WHITMONDAY Moving holiday, falling on the day after Pentecost.
CORPUSCHRISTI Moving holiday, celebrated 60 days after Easter Sunday.
JULIANEASTER
MAYDAY Fixed holiday, falls on May, 1.
ASSUMPTION Fixed holiday, falls on August, 15.
HALLOWEEN Fixed holiday, falls on October, 31.
ALLSAINTSDAY Fixed holiday, falls on November, 1.
ARMISTICE Fixed holiday, falls on November, 11.
CHRISTMAS Fixed holiday, falls on December, 25.

Examples

calendar <- calendar.new()
calendar.holiday(calendar, "EASTERMONDAY") # add Easter Monday

palatej/rjd3modelling documentation built on Jan. 3, 2023, 10:19 p.m.