Holiday dates
holiday.Rd
Returns the date of a holiday.
Usage
holiday(year = getRmetricsOptions("currentYear"), Holiday = "Easter")
Arguments
- Holiday
-
the function name (a character string or unquoted) of an ecclesiastical or public holiday in the G7 countries or Switzerland, see the list below. Can also be a character vector to specify several holidays.
- year
an integer value or vector of years, formatted as
YYYY
.
Details
Easter is the central ecclesiastical holiday. Many other holidays
are related to this feast. The function Easter
computes
the dates of Easter and related ecclesiastical holidays for the
requested year vector. holiday
calculates the dates of
ecclesiastical or publich holidays in the G7 countries, e.g.
holiday(2003, "GoodFriday")
. Rmetrics contains holiday
functions automatically loaded at startup time. The user can
add easily additional holiday functions. The information for
the holidays is collected from several web pages about holiday
calendars.
The following ecclesiastical and public [HOLIDAY]
functions
in the G7 countries and Switzerland are available:
Holidays Related to Easter:
Septuagesima, Quinquagesima, AshWednesday, PalmSunday,
GoodFriday, EasterSunday, Easter, EasterMonday,
RogationSunday, Ascension, Pentecost, PentecostMonday,
TrinitySunday CorpusChristi.
Holidays Related to Christmas:
ChristTheKing, Advent1st, Advent1st, Advent3rd,
Advent4th, ChristmasEve, ChristmasDay, BoxingDay,
NewYearsDay.
Other Ecclestical Feasts:
SolemnityOfMary, Epiphany, PresentationOfLord,
Annunciation, TransfigurationOfLord, AssumptionOfMary,
AssumptionOfMary, BirthOfVirginMary, CelebrationOfHolyCross,
MassOfArchangels, AllSaints, AllSouls.
CHZurich - Public Holidays:
CHBerchtoldsDay, CHSechselaeuten, CHAscension,
CHConfederationDay, CHKnabenschiessen.
GBLondon - Public Holidays:
GBEarlyMayBankHoliday, GBSpringBankHoliday GBSummerBankHoliday, GBNewYearsEve.
(The deprecated GBMayDay and GBBankHoliday are still available but
strongly discouraged. Instead, use GBEarlyMayBankHoliday and
GBSpringBankHoliday, respectively)
DEFrankfurt - Public Holidays:
DEAscension, DECorpusChristi, DEGermanUnity, DEChristmasEve,
DENewYearsEve.
FRParis - Public Holidays:
FRFetDeLaVictoire1945, FRAscension, FRBastilleDay,
FRAssumptionVirginMary, FRAllSaints, FRArmisticeDay.
ITMilano - Public Holidays:
ITEpiphany, ITLiberationDay, ITRepublicAnniversary,
ITAssumptionOfVirginMary, ITAllSaints, ITWWIVictoryAnniversary,
ITStAmrose, ITImmaculateConception.
USNewYork/USChicago - Public Holidays:
USNewYearsDay, USInaugurationDay, USMLKingsBirthday,
USLincolnsBirthday, USWashingtonsBirthday, USMemorialDay,
USIndependenceDay, USLaborDay, USColumbusDay, USElectionDay,
USVeteransDay, USThanksgivingDay, USChristmasDay,
USCPulaskisBirthday, USGoodFriday,
USJuneteenthNationalIndependenceDay.
CAToronto/CAMontreal - Public Holidays:
CAVictoriaDay, CACanadaDay, CACivicProvincialHoliday,
CALabourDay, CAThanksgivingDay, CaRemembranceDay.
JPTokyo/JPOsaka - Public Holidays:
JPNewYearsDay, JPGantan, JPBankHolidayJan2, JPBankHolidayJan3,
JPComingOfAgeDay, JPSeijinNoHi, JPNatFoundationDay,
JPKenkokuKinenNoHi, JPGreeneryDay, JPMidoriNoHi,
JPConstitutionDay, JPKenpouKinenBi, JPNationHoliday,
JPKokuminNoKyujitu, JPChildrensDay, JPKodomoNoHi,
JPMarineDay, JPUmiNoHi, JPRespectForTheAgedDay,
JPKeirouNoHi, JPAutumnalEquinox, JPShuubun-no-hi,
JPHealthandSportsDay, JPTaiikuNoHi, JPNationalCultureDay,
JPBunkaNoHi, JPThanksgivingDay, JPKinrouKanshaNohi,
JPKinrou-kansha-no-hi, JPEmperorsBirthday,
JPTennou-tanjyou-bi, JPTennou-tanjyou-bi.
JPMountainDay
Examples
## holiday -
# Dates for GoodFriday from 2000 until 2005:
holiday(2000:2005, "GoodFriday")
#> GMT
#> [1] [2000-04-21] [2001-04-13] [2002-03-29] [2003-04-18] [2004-04-09]
#> [6] [2005-03-25]
holiday(2000:2005, GoodFriday) # same (GoodFriday is a function)
#> GMT
#> [1] [2000-04-21] [2001-04-13] [2002-03-29] [2003-04-18] [2004-04-09]
#> [6] [2005-03-25]
# Good Friday and Easter
holiday(2000:2005, c("GoodFriday", "Easter"))
#> GMT
#> [1] [2000-04-21] [2001-04-13] [2002-03-29] [2003-04-18] [2004-04-09]
#> [6] [2005-03-25] [2000-04-23] [2001-04-15] [2002-03-31] [2003-04-20]
#> [11] [2004-04-11] [2005-03-27]
holiday(2000:2005, c(GoodFriday, Easter))
#> GMT
#> [1] [2000-04-21] [2001-04-13] [2002-03-29] [2003-04-18] [2004-04-09]
#> [6] [2005-03-25] [2000-04-23] [2001-04-15] [2002-03-31] [2003-04-20]
#> [11] [2004-04-11] [2005-03-27]
## Easter -
Easter(2000:2005)
#> GMT
#> [1] [2000-04-23] [2001-04-15] [2002-03-31] [2003-04-20] [2004-04-11]
#> [6] [2005-03-27]
## GoodFriday -
GoodFriday(2000:2005)
#> GMT
#> [1] [2000-04-21] [2001-04-13] [2002-03-29] [2003-04-18] [2004-04-09]
#> [6] [2005-03-25]
Easter(2000:2005, -2)
#> GMT
#> [1] [2000-04-21] [2001-04-13] [2002-03-29] [2003-04-18] [2004-04-09]
#> [6] [2005-03-25]