1 2# This R package is free software; you can redistribute it and/or 3# modify it under the terms of the GNU Library General Public 4# License as published by the Free Software Foundation; either 5# version 2 of the License, or (at your option) any later version. 6# 7# This R package is distributed in the hope that it will be useful, 8# but WITHOUT ANY WARRANTY; without even the implied warranty of 9# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10# GNU Library General Public License for more details. 11# 12# You should have received a copy of the GNU Library General 13# Public License along with this R package; if not, write to the 14# Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, 15# MA 02111-1307 USA 16 17 18################################################################################ 19# FUNCTION: DESCRIPTION: 20# listHolidays Lists Holidays 21# DEPRECATED: DESCRIPTION: 22# .holidayList Prints all public and ecclestical holidays 23################################################################################ 24 25# ---------------------------------------------------------------------------- # 26# Roxygen Tags 27#' @export 28# ---------------------------------------------------------------------------- # 29listHolidays <- 30 function(pattern = ".*") 31{ 32 # A function implemented by Diethelm Wuertz 33 34 # Description: 35 # Prints all public and ecclestical holidays 36 37 # FUNCTION: 38 39 # List: 40 holidayList = c( 41 "Septuagesima", 42 "Quinquagesima", 43 "AshWednesday", 44 "PalmSunday", 45 "GoodFriday", 46 "Easter", 47 "EasterSunday", 48 "EasterMonday", 49 "RogationSunday", 50 "Ascension", 51 "Pentecost", 52 "PentecostMonday", 53 "TrinitySunday", 54 "CorpusChristi", 55 "ChristTheKing", 56 "Advent1st", 57 "Advent2nd", 58 "Advent3rd", 59 "Advent4th", 60 "ChristmasEve", 61 "ChristmasDay", 62 "BoxingDay", 63 "NewYearsDay", 64 "SolemnityOfMary", 65 "Epiphany", 66 "PresentationOfLord", 67 "Annunciation", 68 "TransfigurationOfLord", 69 "AssumptionOfMary", 70 "BirthOfVirginMary", 71 "CelebrationOfHolyCross", 72 "MassOfArchangels", 73 "AllSaints", 74 "AllSouls", 75 "LaborDay", 76 "CHBerchtoldsDay", 77 "CHSechselaeuten", 78 "CHAscension", 79 "CHConfederationDay", 80 "CHKnabenschiessen", 81 "GBMayDay", 82 "GBBankHoliday", 83 "GBSummerBankHoliday", 84 "GBMilleniumDay", 85 "DEAscension", 86 "DECorpusChristi", 87 "DEGermanUnity", 88 "DEChristmasEve", 89 "DENewYearsEve", 90 "FRFetDeLaVictoire1945", 91 "FRAscension", 92 "FRBastilleDay", 93 "FRAssumptionVirginMary", 94 "FRAllSaints", 95 "FRArmisticeDay", 96 "ITEpiphany", 97 "ITLiberationDay", 98 "ITAssumptionOfVirginMary", 99 "ITAllSaints", 100 "ITStAmrose", 101 "ITImmaculateConception", 102 "USDecorationMemorialDay", 103 "USPresidentsDay", 104 "USNewYearsDay", 105 "USInaugurationDay", 106 "USMLKingsBirthday", 107 "USLincolnsBirthday", 108 "USWashingtonsBirthday", 109 "USMemorialDay", 110 "USIndependenceDay", 111 "USLaborDay", 112 "USColumbusDay", 113 "USElectionDay", 114 "USVeteransDay", 115 "USThanksgivingDay", 116 "USChristmasDay", 117 "USCPulaskisBirthday", 118 "USGoodFriday", 119 "CAVictoriaDay", 120 "CACanadaDay", 121 "CACivicProvincialHoliday", 122 "CALabourDay", 123 "CAThanksgivingDay", 124 "CaRemembranceDay", 125 "JPNewYearsDay", 126 "JPGantan", 127 "JPBankHolidayJan2", 128 "JPBankHolidayJan3", 129 "JPComingOfAgeDay", 130 "JPSeijinNoHi", 131 "JPNatFoundationDay", 132 "JPKenkokuKinenNoHi", 133 "JPGreeneryDay", 134 "JPMidoriNoHi", 135 "JPConstitutionDay", 136 "JPKenpouKinenBi", 137 "JPNationHoliday", 138 "JPKokuminNoKyujitu", 139 "JPChildrensDay", 140 "JPKodomoNoHi", 141 "JPMarineDay", 142 "JPUmiNoHi", 143 "JPRespectForTheAgedDay", 144 "JPKeirouNOhi", 145 "JPAutumnalEquinox", 146 "JPShuubunNoHi", 147 "JPHealthandSportsDay", 148 "JPTaiikuNoHi", 149 "JPNationalCultureDay", 150 "JPBunkaNoHi", 151 "JPThanksgivingDay", 152 "JPKinrouKanshaNoHi", 153 "JPEmperorsBirthday", 154 "JPTennouTanjyouBi", 155 "JPBankHolidayDec31") 156 157 # Financial Centers: 158 if (pattern == "*") pattern = "\\\\*" 159 160 # Return Value: 161 sort(as.character(holidayList[grep(pattern = pattern, x = holidayList)])) 162} 163 164 165# ------------------------------------------------------------------------------ 166 167 168# Keep for compatibility of older Rmetrics versions ... 169 170 171.holidayList <- listHolidays() 172 173 174################################################################################ 175 176