Allows to define a holiday which date is related to Easter Sunday.
Arguments
- offset
The position of the holiday in relation to Easter Sunday, measured in days (can be positive or negative).
- julian
Boolean indicating if Julian calendar must be used.
- 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"
.
References
More information on calendar correction in JDemetra+ online documentation: https://jdemetra-new-documentation.netlify.app/a-calendar-correction
Examples
easter_day(1) # Easter Monday
#> Easter related day: offset=1
easter_day(-2) # Easter Good Friday
#> Easter related day: offset=-2
# Corpus Christi 60 days after Easter
# Sunday in Julian calendar with weight 0.5, from January 2000 to December 2020
easter_day(
offset = 60, julian = TRUE, weight = 0.5,
validity = list(start = "2000-01-01", end = "2020-12-01")
)
#> Easter related day: offset=60 , weight=0.5 , from=2000-01-01 , to=2020-12-01