special_day: List of Pre-Defined Holidays to choose from

View source: R/calendars.R

special_dayR Documentation

List of Pre-Defined Holidays to choose from

Description

Allows to define a holiday choosing from a list of pre-specified events, equivalent to use fixed_day or easter_day functions.

Usage

special_day(event, offset = 0, weight = 1, validity = NULL)

Arguments

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.

validity

validity period: either NULL (full sample) or a named list with "start" and/or "end" dates in the format "YYYY-MM-DD".

Details

Possible values :

NEWYEAR Fixed holiday, falls on January, 1st.
SHROVEMONDAY Moving holiday, falls on the Monday before Ash Wednesday (48 days before Easter Sunday).
SHROVETUESDAY Moving holiday, falls on the 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, falls between March 22nd and April 25th.
EASTERMONDAY Moving holiday, falls on the day after Easter.
ASCENSION Moving holiday, celebrated on a 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, 1st.
ASSUMPTION Fixed holiday, falls on August, 15th.
HALLOWEEN Fixed holiday, falls on October, 31st.
ALLSAINTSDAY Fixed holiday, falls on November, 1st.
ARMISTICE Fixed holiday, falls on November, 11th.
CHRISTMAS Fixed holiday, falls on December, 25th.

References

More information on calendar correction in JDemetra+ online documentation: https://jdemetra-new-documentation.netlify.app/a-calendar-correction

See Also

national_calendar, fixed_day, easter_day

Examples

# To add Easter Monday
special_day("EASTERMONDAY")
# To define a holiday for the day after Christmas, with validity and weight
special_day("CHRISTMAS",
    offset = 1, weight = 0.8,
    validity = list(start = "2000-01-01", end = "2020-12-01")
)

palatej/rjd3toolkit documentation built on Oct. 30, 2024, 10:46 p.m.