Skip to contents

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 :

NEWYEARFixed holiday, falls on January, 1st.
SHROVEMONDAYMoving holiday, falls on the Monday before Ash Wednesday (48 days before Easter Sunday).
SHROVETUESDAYMoving holiday, falls on the Tuesday before Ash Wednesday (47 days before Easter Sunday).
ASHWEDNESDAYMoving holiday, occurring 46 days before Easter Sunday.
MAUNDYTHURSDAYMoving holiday, falls on the Thursday before Easter.
GOODFRIDAYMoving holiday, falls on the Friday before Easter.
EASTERMoving holiday, falls between March 22nd and April 25th.
EASTERMONDAYMoving holiday, falls on the day after Easter.
ASCENSIONMoving holiday, celebrated on a Thursday, 39 days after Easter.
PENTECOSTMoving holiday, celebrated 49 days after Easter Sunday.
WHITMONDAYMoving holiday, falling on the day after Pentecost.
CORPUSCHRISTIMoving holiday, celebrated 60 days after Easter Sunday.
JULIANEASTER
MAYDAYFixed holiday, falls on May, 1st.
ASSUMPTIONFixed holiday, falls on August, 15th.
HALLOWEENFixed holiday, falls on October, 31st.
ALLSAINTSDAYFixed holiday, falls on November, 1st.
ARMISTICEFixed holiday, falls on November, 11th.
CHRISTMASFixed holiday, falls on December, 25th.

References

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

Examples

# To add Easter Monday
special_day("EASTERMONDAY")
#> Prespecified holiday: event=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"))
#> Prespecified holiday: event=CHRISTMAS , offset=1 , weight=0.8 , from=2000-01-01 , to=2020-12-01