1*cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2*cdf0e10cSrcweir<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> 3*cdf0e10cSrcweir<script:module xmlns:script="http://openoffice.org/2000/script" script:name="LocalHolidays" script:language="StarBasic">Option Explicit 4*cdf0e10cSrcweir 5*cdf0e10cSrcweirSub Main 6*cdf0e10cSrcweir Call CalAutopilotTable() 7*cdf0e10cSrcweirEnd Sub 8*cdf0e10cSrcweir 9*cdf0e10cSrcweir 10*cdf0e10cSrcweirSub FindWholeYearHolidays_FRANCE(ByVal YearInt as Integer) 11*cdf0e10cSrcweirDim lEasterDate& 12*cdf0e10cSrcweirDim lDate& 13*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Jour de l'an", cHolidayType_Full) 14*cdf0e10cSrcweir lEasterDate = CalEasterTable(YearInt) 15*cdf0e10cSrcweir CalInsertBankholiday(lEasterDate, "Pâques", cHolidayType_Full) 16*cdf0e10cSrcweir CalInsertBankholiday(lEasterDate + 1, "Lundi de Pâques", cHolidayType_Full) 17*cdf0e10cSrcweir CalInsertBankholiday(lEasterDate + 39, "Ascension", cHolidayType_Full) 18*cdf0e10cSrcweir CalInsertBankholiday(lEasterDate + 49, "Pentecôte", cHolidayType_Full) 19*cdf0e10cSrcweir CalInsertBankholiday(lEasterDate + 50, "Lundi de Pentecôte", cHolidayType_Full) 20*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Fête du travail", cHolidayType_Full) 21*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 8), "Victoire 1945", cHolidayType_Full) 22*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 7, 14), "Fête Nationale", cHolidayType_Full) 23*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Assomption", cHolidayType_Full) 24*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Toussaint", cHolidayType_Full) 25*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Armistice ou Victoire 1918", cHolidayType_Full) 26*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Noël", cHolidayType_Full) 27*cdf0e10cSrcweirEnd Sub 28*cdf0e10cSrcweir 29*cdf0e10cSrcweir 30*cdf0e10cSrcweirSub FindWholeYearHolidays_SWED(ByVal YearInt as Integer) 31*cdf0e10cSrcweirDim lDate& 32*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nyårsdagen", cHolidayType_Full) 33*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trettondagen", cHolidayType_Full) 34*cdf0e10cSrcweir lDate = CalEasterTable(YearInt) 35*cdf0e10cSrcweir CalInsertBankholiday(lDate - 2, "Långfredagen", cHolidayType_Full) 36*cdf0e10cSrcweir CalInsertBankholiday(lDate, "Påskdagen", cHolidayType_Full) 37*cdf0e10cSrcweir CalInsertBankholiday(lDate + 1, "Annandag påsk", cHolidayType_Full) 38*cdf0e10cSrcweir CalInsertBankholiday(lDate + 39, "Kristi himmelfärds dag", cHolidayType_Full) 39*cdf0e10cSrcweir CalInsertBankholiday(lDate + 49, "Pingstdagen", cHolidayType_Full) 40*cdf0e10cSrcweir CalInsertBankholiday(lDate + 50, "Annandag pingst", cHolidayType_Full) 41*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "1:a maj", cHolidayType_Full) 42*cdf0e10cSrcweir ' MidSummerfeast (next Sunday after 20th June) 43*cdf0e10cSrcweir CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), "Midsommardagen", cHolidayType_Full) 44*cdf0e10cSrcweir CalInsertBankholiday(GetNextWeekDay(YearInt, 10, 31, 7), "Alla helgons dag", cHolidayType_Full) 45*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Juldagen", cHolidayType_Full) 46*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Annandag jul", cHolidayType_Full) 47*cdf0e10cSrcweirEnd Sub 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir 51*cdf0e10cSrcweirSub FindWholeYearHolidays_FI(ByVal YearInt as Integer) 52*cdf0e10cSrcweir Dim OsternDate& 53*cdf0e10cSrcweir ' New Year 54*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Uudenvuodenpäivä", cHolidayType_Full) 55*cdf0e10cSrcweir ' "the three Magi" 56*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Loppiainen", cHolidayType_Half) 57*cdf0e10cSrcweir OsternDate = CalEasterTable(YearInt) 58*cdf0e10cSrcweir CalInsertBankholiday(OsternDate-2, "Pitkäperjantai", cHolidayType_Full) 59*cdf0e10cSrcweir CalInsertBankholiday(OsternDate, "Pääsiäispäivä", cHolidayType_Full) 60*cdf0e10cSrcweir CalInsertBankholiday(OsternDate+1, "2. pääsiäispäivä", cHolidayType_Full) 61*cdf0e10cSrcweir ' Ascension Day 62*cdf0e10cSrcweir CalInsertBankholiday(OsternDate+39, "Helatorstai", cHolidayType_Full) 63*cdf0e10cSrcweir ' First of May 64*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Vappu, suomalaisen työn päivä", cHolidayType_Full) 65*cdf0e10cSrcweir ' Mothers Day : 2nd Sunday in May, Full 66*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Äitienpäivä", cHolidayType_Full) 67*cdf0e10cSrcweir ' MidSummerfeast (next Sunday after 20th June) 68*cdf0e10cSrcweir CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), "Juhannus, Suomen lipun päivä", cHolidayType_Full) 69*cdf0e10cSrcweir ' Independance day 70*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Itsenäisyyspäivä", cHolidayType_Full) 71*cdf0e10cSrcweir ' Christmas 72*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Joulupäivä", cHolidayType_Full) 73*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Tapaninpäivä", cHolidayType_Full) 74*cdf0e10cSrcweirEnd Sub 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir 78*cdf0e10cSrcweirSub FindWholeYearHolidays_DK (ByVal YearInt as Integer) 79*cdf0e10cSrcweirDim lDate&, VierterAdvent& 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir 'New Year 82*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nytårsdag", cHolidayType_Full) 83*cdf0e10cSrcweir lDate = CalEasterTable (YearInt) 84*cdf0e10cSrcweir ' carnival 85*cdf0e10cSrcweir CalInsertBankholiday(lDate-49, "Fastelavn", cHolidayType_Half) 86*cdf0e10cSrcweir '"Maundy Tuesday 87*cdf0e10cSrcweir CalInsertBankholiday(lDate-3, "Skærtorsdag", cHolidayType_Full) 88*cdf0e10cSrcweir '"Good Friday " 89*cdf0e10cSrcweir CalInsertBankholiday(lDate-2, "Langfredag", cHolidayType_Full) 90*cdf0e10cSrcweir ' Easter Sunday 91*cdf0e10cSrcweir CalInsertBankholiday(lDate, "Påskesøndag", cHolidayType_Full) 92*cdf0e10cSrcweir ' Easter Monday 93*cdf0e10cSrcweir CalInsertBankholiday(lDate+1, "2. påskedag", cHolidayType_Full) 94*cdf0e10cSrcweir ' 4th Friday after Easter 95*cdf0e10cSrcweir CalInsertBankholiday(lDate+26, "Store bededag", cHolidayType_Full) 96*cdf0e10cSrcweir ' "Ascension Day 97*cdf0e10cSrcweir CalInsertBankholiday(lDate+39, "Kristi himmelfahrt", cHolidayType_Full) 98*cdf0e10cSrcweir ' "Whitsunday" 99*cdf0e10cSrcweir CalInsertBankholiday(lDate+49, "Pinsesøndag", cHolidayType_Full) 100*cdf0e10cSrcweir ' "Whitmonday" 101*cdf0e10cSrcweir CalInsertBankholiday(lDate+50, "2. pinsedag", cHolidayType_Full) 102*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 5), "Grundlovsdag", cHolidayType_Full) 103*cdf0e10cSrcweir 'Christmas Days 104*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "1. juledag", cHolidayType_Full) 105*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 26), "2. juledag", cHolidayType_Full) 106*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Hellig 3 konger", cHolidayType_Half) 107*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 28), "Dr. Ingrid", cHolidayType_Half) 108*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 16), "Dr. Margrete", cHolidayType_Half) 109*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 16), "Palmesøndag", cHolidayType_Half) 110*cdf0e10cSrcweir ' "Liberation day" 111*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 5), "Befrielsesdag", cHolidayType_Half) 112*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 26), "Krpr. Frederik", cHolidayType_Half) 113*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 7), "Pr. Joachim", cHolidayType_Half) 114*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 11), "Pr. Henrik", cHolidayType_Half) 115*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 15), "Valdemarsdag", cHolidayType_Half) 116*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 24), "Skt. Hans", cHolidayType_Half) 117*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 30), "Prinsesse Alexandra", cHolidayType_Half) 118*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 28), "Pr. Nikolai", cHolidayType_Half) 119*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 24), "FN-dag", cHolidayType_Half) 120*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Morten Bisp", cHolidayType_Half) 121*cdf0e10cSrcweir ' all half (Memorial Days) 122*cdf0e10cSrcweir '"adventdays 123*cdf0e10cSrcweir VierterAdvent = DateSerial(YearInt, 12, 24) 124*cdf0e10cSrcweir While (Weekday(VierterAdvent) <> 1) 125*cdf0e10cSrcweir vierterAdvent = vierterAdvent - 1 126*cdf0e10cSrcweir Wend 127*cdf0e10cSrcweir CalInsertBankholiday(vierterAdvent-21, "1. søndag i advent", cHolidayType_Half) 128*cdf0e10cSrcweir CalInsertBankholiday(vierterAdvent-14, "2. søndag i advent", cHolidayType_Half) 129*cdf0e10cSrcweir CalInsertBankholiday(vierterAdvent-7, "3. søndag i advent", cHolidayType_Half) 130*cdf0e10cSrcweir CalInsertBankholiday(vierterAdvent, "4. søndag i advent", cHolidayType_Half) 131*cdf0e10cSrcweir 'Christmas eve 132*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Juleaften", cHolidayType_Half) 133*cdf0e10cSrcweir '"New Year's eve" 134*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Nytårsaften", cHolidayType_Half) 135*cdf0e10cSrcweirEnd Sub 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir 138*cdf0e10cSrcweirSub FindWholeYearHolidays_ITA(ByVal YearInt as Integer) 139*cdf0e10cSrcweirDim lDate& 140*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Capodanno", cHolidayType_Full) 141*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Epifania", cHolidayType_Full) 142*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 25), "Festa della liberazione", cHolidayType_Full) 143*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Ferragusto", cHolidayType_Full) 144*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Tutti i Santi", cHolidayType_Full) 145*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 8), "Immacolata concezione", cHolidayType_Full) 146*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Natale", cHolidayType_Full) 147*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Santo Stefano", cHolidayType_Full) 148*cdf0e10cSrcweir lDate = CalEasterTable(YearInt) 149*cdf0e10cSrcweir CalInsertBankholiday(lDate, "Pasqua", cHolidayType_Full) 150*cdf0e10cSrcweir CalInsertBankholiday(lDate+1, "Lunedì dell'Angelo", cHolidayType_Full) 151*cdf0e10cSrcweirEnd Sub 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir 155*cdf0e10cSrcweirSub FindWholeYearHolidays_TRK(ByVal YearInt as Integer) 156*cdf0e10cSrcweirDim lDate as Long 157*cdf0e10cSrcweir ' New Years' Day 158*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Yılbaşı", cHolidayType_Full) 159*cdf0e10cSrcweir ' National Sovereignty and Children's Day 160*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 23), "Ulusal Egemenlik ve Çocuk Bayramı", cHolidayType_Full) 161*cdf0e10cSrcweir ' Ataturk Commemoration and Youth & Sports Day 162*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 19), "Atatürk'ü Anma, Gençlik ve Spor Bayramı", cHolidayType_Full) 163*cdf0e10cSrcweir ' Mothers Day : 2nd Sunday in May, Full 164*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Anneler günü", cHolidayType_Full) 165*cdf0e10cSrcweir ' Fathers Day: 3rd Sunday in May, Full 166*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), "Babalar Günü", cHolidayType_Full) 167*cdf0e10cSrcweir ' Victory Day 168*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 30), "Zafer Bayramı", cHolidayType_Full) 169*cdf0e10cSrcweir ' Republic Day 170*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 28), "Cumhuriyet Bayramı", cHolidayType_Full) 171*cdf0e10cSrcweir ' Republic Day 172*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 29), "Cumhuriyet Bayramı", cHolidayType_Full) 173*cdf0e10cSrcweir ' Commemoration Of Ataturk-Anniversary of Ataturk's Death 174*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 10), "Atatürk'ün Ölüm Günü", cHolidayType_Full) 175*cdf0e10cSrcweir CalculateturkishReligousHolidays(YearInt) 176*cdf0e10cSrcweirEnd Sub 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir 179*cdf0e10cSrcweirSub CalculateturkishReligousHolidays(iSelYear as Integer) 180*cdf0e10cSrcweirDim lKurbanBayRamStartDate as Long 181*cdf0e10cSrcweirDim lRamazanBayRamStartDate as Long 182*cdf0e10cSrcweir 183*cdf0e10cSrcweir Select Case iSelYear 184*cdf0e10cSrcweir Case 2002 185*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 21) 186*cdf0e10cSrcweir lRamazanBayRamStartDate = DateSerial(iSelYear, 12, 4) 187*cdf0e10cSrcweir Case 2003 188*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 10) 189*cdf0e10cSrcweir lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 24) 190*cdf0e10cSrcweir Case 2004 191*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 31) 192*cdf0e10cSrcweir lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 13) 193*cdf0e10cSrcweir Case 2005 194*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 19) 195*cdf0e10cSrcweir lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 2) 196*cdf0e10cSrcweir Case 2006 197*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 30) 198*cdf0e10cSrcweir CalInsertBankholiday(lKurbanBayRamStartDate, "Kurban Bayramı Arefesi", cHolidayType_Half) 199*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(iSelYear, 12, 31), "Kurban Bayram", cHolidayType_Full) 200*cdf0e10cSrcweir 201*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 9) 202*cdf0e10cSrcweir lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 22) 203*cdf0e10cSrcweir Case 2007 204*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 1) 205*cdf0e10cSrcweir ' Note: The first day has already been in 2006!!! 206*cdf0e10cSrcweir AddFollowUpHolidays(lKurbanBayRamStartDate-1, 3, "Kurban Bayram", cHolidayType_Full) 207*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 19) 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 11) 210*cdf0e10cSrcweir Case 2008 211*cdf0e10cSrcweir lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 7) 212*cdf0e10cSrcweir lRamazanBayRamStartDate = DateSerial(iSelYear, 9, 29) 213*cdf0e10cSrcweir Case Else 214*cdf0e10cSrcweir Exit Sub 215*cdf0e10cSrcweir End Select 216*cdf0e10cSrcweir 'Feast Of the Sacrifice Eve 217*cdf0e10cSrcweir CalInsertBankholiday(lKurbanBayRamStartDate, "Kurban Bayramı Arefesi", cHolidayType_Half) 218*cdf0e10cSrcweir 'Feast Of the Sacrifice 219*cdf0e10cSrcweir AddFollowUpHolidays(lKurbanBayRamStartDate, 4, "Kurban Bayram", cHolidayType_Full) 220*cdf0e10cSrcweir ' End of Ramadan Eve 221*cdf0e10cSrcweir CalInsertBankholiday(lRamazanBayRamStartDate, "Ramazan (Şeker) Bayramı Arefesi", cHolidayType_Half) 222*cdf0e10cSrcweir ' End of Ramadan 223*cdf0e10cSrcweir AddFollowUpHolidays(lRamazanBayRamStartDate, 3, "Ramazan (Şeker) Bayramı", cHolidayType_Full) 224*cdf0e10cSrcweirEnd Sub 225*cdf0e10cSrcweir 226*cdf0e10cSrcweir 227*cdf0e10cSrcweirSub FindWholeYearHolidays_GREEK(ByVal YearInt as Integer) 228*cdf0e10cSrcweirDim lDate as Long 229*cdf0e10cSrcweir ' New Year 230*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Πρωτοχρονιά", cHolidayType_Full) 231*cdf0e10cSrcweir 'Schol Holiday 232*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 30), "Τριών Ιεραρχών", cHolidayType_Full) 233*cdf0e10cSrcweir ' This is both a National Holiday and a religious holiday 234*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 25), "Εθνική Εορτή Ευαγγελισμός Θεοτόκου", cHolidayType_Full) 235*cdf0e10cSrcweir ' Labor Day 236*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Πρωτομαγιά", cHolidayType_Full) 237*cdf0e10cSrcweir ' Assumption Day 238*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Κοίμηση της Θεοτόκου", cHolidayType_Full) 239*cdf0e10cSrcweir ' National Resistance Day 240*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 28), "Εθνική Εορτή", cHolidayType_Full) 241*cdf0e10cSrcweir ' School Holiday 242*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 17), "Επέτειος του Πολυτεχνείου", cHolidayType_Full) 243*cdf0e10cSrcweir ' Christmas Eve 244*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Παραμονή Χριστουγέννων", cHolidayType_Full) 245*cdf0e10cSrcweir ' Christmas Day 246*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Χριστούγεννα", cHolidayType_Full) 247*cdf0e10cSrcweir ' Boxing Day 248*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Δεύτερη μέρα Χριστουγέννων", cHolidayType_Full) 249*cdf0e10cSrcweir lDate = CalOrthodoxEasterTable(YearInt) 250*cdf0e10cSrcweir ' Triodon 251*cdf0e10cSrcweir CalInsertBankholiday(lDate-70, "Αρχή Τριωδίου", cHolidayType_Full) 252*cdf0e10cSrcweir ' Meat Fare 253*cdf0e10cSrcweir CalInsertBankholiday(lDate-56, "Τσικνοπέμπτη", cHolidayType_Full) 254*cdf0e10cSrcweir ' First Day of Lent 255*cdf0e10cSrcweir CalInsertBankholiday(lDate-48, "Καθαρή Δευτέρα", cHolidayType_Full) 256*cdf0e10cSrcweir ' Saturday of Lazarus 257*cdf0e10cSrcweir CalInsertBankholiday(lDate-8, "Σάββατο του Λαζάρου", cHolidayType_Full) 258*cdf0e10cSrcweir ' Palm Sunday 259*cdf0e10cSrcweir CalInsertBankholiday(lDate-7, "Κυριακή των Βαΐων", cHolidayType_Full) 260*cdf0e10cSrcweir ' Monday before Easter 261*cdf0e10cSrcweir CalInsertBankholiday(lDate-6, "Μεγάλη Δευτέρα", cHolidayType_Full) 262*cdf0e10cSrcweir ' Tuesday before Easter 263*cdf0e10cSrcweir CalInsertBankholiday(lDate-5, "Μεγάλη Τρίτη", cHolidayType_Full) 264*cdf0e10cSrcweir ' Wednesday before Easter 265*cdf0e10cSrcweir CalInsertBankholiday(lDate-4, "Μεγάλη Τετάρτη", cHolidayType_Full) 266*cdf0e10cSrcweir ' Thursday before Easter 267*cdf0e10cSrcweir CalInsertBankholiday(lDate-3, "Μεγάλη Πέμπτη", cHolidayType_Full) 268*cdf0e10cSrcweir ' Good Friday 269*cdf0e10cSrcweir CalInsertBankholiday(lDate-2, "Μεγάλη Παρασκευή", cHolidayType_Full) 270*cdf0e10cSrcweir ' Saturday before Easter 271*cdf0e10cSrcweir CalInsertBankholiday(lDate-1, "Μεγάλο Σάββατο", cHolidayType_Full) 272*cdf0e10cSrcweir ' Easter Monday 273*cdf0e10cSrcweir CalInsertBankholiday(lDate+1, "Δευτέρα του Πάσχα", cHolidayType_Full) 274*cdf0e10cSrcweir ' Pentecost 275*cdf0e10cSrcweir CalInsertBankholiday(lDate+49, "Κυριακή της Πεντηκοστής", cHolidayType_Full) 276*cdf0e10cSrcweir ' Ascension Day 277*cdf0e10cSrcweir CalInsertBankholiday(lDate+39, "Του Αγίου Πνεύματος", cHolidayType_Full) 278*cdf0e10cSrcweir ' All Saints Day 279*cdf0e10cSrcweir CalInsertBankholiday(lDate+56, "Των Αγίων Πάντων", cHolidayType_Full) 280*cdf0e10cSrcweirEnd Sub 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir 284*cdf0e10cSrcweirSub FindWholeYearHolidays_SPAIN(ByVal YearInt as Integer) 285*cdf0e10cSrcweirDim lDate& 286*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Año Nuevo", cHolidayType_Full) 287*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Reyes", cHolidayType_Full) 288*cdf0e10cSrcweir lDate = CalEasterTable(YearInt) 289*cdf0e10cSrcweir CalInsertBankholiday(lDate-2, "Viernes Santo", cHolidayType_Full) 290*cdf0e10cSrcweir CalInsertBankholiday(lDate+1, "Lunes de Pascua Florida", cHolidayType_Full) 291*cdf0e10cSrcweir CalInsertBankholiday(lDate+39, "Día de la Ascensión", cHolidayType_Full) 292*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Fiesta del Trabajo", cHolidayType_Full) 293*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Día de la Asunción", cHolidayType_Full) 294*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 12), "Fiesta de la Hispanidad", cHolidayType_Full) 295*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Todos los Santos", cHolidayType_Full) 296*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Día de la Constitución", cHolidayType_Full) 297*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 8), "La Inmaculada", cHolidayType_Full) 298*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Navidad", cHolidayType_Full) 299*cdf0e10cSrcweirEnd Sub 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir 302*cdf0e10cSrcweirSub FindWholeYearHolidays_PORT(ByVal YearInt as Integer) 303*cdf0e10cSrcweirDim lDate& 304*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Ano Novo", cHolidayType_Full) 305*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Reis Magos", cHolidayType_Half) 306*cdf0e10cSrcweir lDate = CalEasterTable(YearInt) 307*cdf0e10cSrcweir CalInsertBankholiday(lDate-47, "Carnaval", cHolidayType_Full) 308*cdf0e10cSrcweir CalInsertBankholiday(lDate-7, "Domingo de Ramos", cHolidayType_Half) 309*cdf0e10cSrcweir CalInsertBankholiday(lDate-2, "Sexta-feira Santa", cHolidayType_Full) 310*cdf0e10cSrcweir CalInsertBankholiday(lDate, "Páscoa", cHolidayType_Full) 311*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 25), "25 de Abril", cHolidayType_Full) 312*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Dia do Trabalhador", cHolidayType_Full) 313*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 29), "Corpo de Deus", cHolidayType_Full) 314*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 10), "Dia de Camões e das Comunidades Portuguesas", cHolidayType_Full) 315*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 24), "S. João", cHolidayType_Full) 316*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 29), "S. Pedro", cHolidayType_Full) 317*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Assunção de Nossa Senhora", cHolidayType_Full) 318*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 5), "Implantação da República", cHolidayType_Full) 319*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Dia de Todos os Santos", cHolidayType_Full) 320*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 8), "Imaculada Conceição", cHolidayType_Full) 321*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Natal", cHolidayType_Full) 322*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 1), "Restauração da Independência", cHolidayType_Full) 323*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Passagem de Ano", cHolidayType_Half) 324*cdf0e10cSrcweirEnd Sub 325*cdf0e10cSrcweir 326*cdf0e10cSrcweir 327*cdf0e10cSrcweirSub FindWholeYearHolidays_NL(ByVal YearInt as Integer) 328*cdf0e10cSrcweirDim lDate& 329*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nieuwjaarsdag", cHolidayType_Full) 330*cdf0e10cSrcweir lDate = CalEasterTable(YearInt) 331*cdf0e10cSrcweir CalInsertBankholiday(lDate, "1e Paasdag", cHolidayType_Full) 332*cdf0e10cSrcweir CalInsertBankholiday(lDate + 1, "2e Paasdag", cHolidayType_Full) 333*cdf0e10cSrcweir CalInsertBankholiday(lDate + 39, "Hemelvaartsdag", cHolidayType_Full) 334*cdf0e10cSrcweir CalInsertBankholiday(lDate + 49, "1e Pinksterdag", cHolidayType_Full) 335*cdf0e10cSrcweir CalInsertBankholiday(lDate + 50, "2e Pinksterdag", cHolidayType_Full) 336*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 30), "Koninginnedag", cHolidayType_Full) 337*cdf0e10cSrcweir ' Bevrijdingsdag is celebrated every 5th year 338*cdf0e10cSrcweir If YearInt Mod 5 = 0 then 339*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 5), "Bevrijdingsdag", cHolidayType_Full) 340*cdf0e10cSrcweir End if 341*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Sinterklaas", cHolidayType_Half) 342*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "1e Kerstdag", cHolidayType_Full) 343*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 26), "2e Kerstdag", cHolidayType_Full) 344*cdf0e10cSrcweirEnd Sub 345*cdf0e10cSrcweir 346*cdf0e10cSrcweir 347*cdf0e10cSrcweirSub FindWholeYearHolidays_PL (ByVal YearInt as Integer) 348*cdf0e10cSrcweir Dim lDate&, OsternDate& 349*cdf0e10cSrcweir ' New Year 350*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nowy Rok", cHolidayType_Full) 351*cdf0e10cSrcweir ' "the three Magi" 352*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trzech Króli", cHolidayType_Half) 353*cdf0e10cSrcweir ' "Womens' Day" 354*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 8), "Dzień Kobiet", cHolidayType_Half) 355*cdf0e10cSrcweir OsternDate = CalEasterTable(YearInt) 356*cdf0e10cSrcweir CalInsertBankholiday(OsternDate-2, "Wielki Piątek", cHolidayType_Full) 357*cdf0e10cSrcweir CalInsertBankholiday(OsternDate, "Wielka Niedziela", cHolidayType_Full) 358*cdf0e10cSrcweir CalInsertBankholiday(OsternDate+1, "Lany Poniedziałek", cHolidayType_Full) 359*cdf0e10cSrcweir ' Ascension Day 360*cdf0e10cSrcweir CalInsertBankholiday(OsternDate+39, "Wniebowstąpienie", cHolidayType_Full) 361*cdf0e10cSrcweir ' Pentecost 362*cdf0e10cSrcweir CalInsertBankholiday(OsternDate+49, "Zielone Świątki", cHolidayType_Full) 363*cdf0e10cSrcweir ' Feast of Corpus Christi 364*cdf0e10cSrcweir CalInsertBankholiday(OsternDate+60, "Boże Ciało", cHolidayType_Full) 365*cdf0e10cSrcweir ' First of May 366*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Święto pracy", cHolidayType_Full) 367*cdf0e10cSrcweir ' Memorial day of constitution 368*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 3), "Dzień konstytucji 3-go maja", cHolidayType_Full) 369*cdf0e10cSrcweir ' "Childrens' day" 370*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 1), "Dzień Dziecka", cHolidayType_Half) 371*cdf0e10cSrcweir ' "Ascension Day" 372*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Matki Boskiej Zielnej", cHolidayType_Half) 373*cdf0e10cSrcweir ' "All Saints' Day " 374*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Wszystkich Świętych", cHolidayType_Full) 375*cdf0e10cSrcweir ' National day" 376*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Dzień Niepodległości", cHolidayType_Full) 377*cdf0e10cSrcweir ' Christmas Eve 378*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Wigilia", cHolidayType_Half) 379*cdf0e10cSrcweir ' Christmas 380*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Boże Narodzenie", cHolidayType_Full) 381*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Boże Narodzenie", cHolidayType_Full) 382*cdf0e10cSrcweir ' "New Year's eve" 383*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Sylwester", cHolidayType_Half) 384*cdf0e10cSrcweirEnd Sub 385*cdf0e10cSrcweir 386*cdf0e10cSrcweir 387*cdf0e10cSrcweirSub FindWholeYearHolidays_RU (ByVal YearInt as Integer) 388*cdf0e10cSrcweirDim lDate& 389*cdf0e10cSrcweir ' New Year 390*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Новый Год", cHolidayType_Full) 391*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 2), "Новый Год", cHolidayType_Full) 392*cdf0e10cSrcweir ' Russian Christmas" 393*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 7), "Рождество", cHolidayType_Full) 394*cdf0e10cSrcweir 'Day of Defender of Motherland 395*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 2, 23), "День Защитника Отечества", cHolidayType_Full) 396*cdf0e10cSrcweir ' Woman Day 397*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 8), "Международный Женский День", cHolidayType_Full) 398*cdf0e10cSrcweir ' Spring and labor holiday 399*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Праздник Весны и Труда", cHolidayType_Full) 400*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 2), "Праздник Весны и Труда", cHolidayType_Full) 401*cdf0e10cSrcweir ' Victory of the second World War 402*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 9), "День Победы", cHolidayType_Full) 403*cdf0e10cSrcweir ' Independence Day 404*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 12), "День Независимости", cHolidayType_Full) 405*cdf0e10cSrcweir ' Day of Accord and Conciliation 406*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 7), "День Согласия и Примирения", cHolidayType_Full) 407*cdf0e10cSrcweir ' Constitution Day 408*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 12), "День Конституции", cHolidayType_Full) 409*cdf0e10cSrcweirEnd Sub 410*cdf0e10cSrcweir 411*cdf0e10cSrcweir 412*cdf0e10cSrcweirSub FindWholeYearHolidays_US(ByVal YearInt as Integer) 413*cdf0e10cSrcweirDim lDate as Long 414*cdf0e10cSrcweirDim lFirstNov as Long 415*cdf0e10cSrcweirDim lElectDate as Long 416*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "New Year's Day", cHolidayType_Full) 417*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 2, 2), "Groundhog Day", cHolidayType_Half) 418*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 2, 14), "Valentine's Day", cHolidayType_Half) 419*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 17), "St Patrick's Day", cHolidayType_Half) 420*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 1), "April Fools' Day", cHolidayType_Half) 421*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 22), "Earth Day", cHolidayType_Half) 422*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 6), "Nurses' Day", cHolidayType_Half) 423*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 14), "Flag Day", cHolidayType_Half) 424*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 14), "Army Day", cHolidayType_Half) 425*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 19), "Juneteenth(Liberation of Slaves)", cHolidayType_Half) 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 7, 4), "Independence Day", cHolidayType_Full) 428*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 1), "Air Force Day", cHolidayType_Half) 429*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 4), "Coast Guard Day", cHolidayType_Half) 430*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 9, 17), "Citizenship Day or Constitution Day", cHolidayType_Half) 431*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 16), "Bosses' Day", cHolidayType_Half) 432*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 26 ), "Mother-in-Law's Day", cHolidayType_Half) 433*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 27), "Navy Day", cHolidayType_Half) 434*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 31), "Halloween", cHolidayType_Half) 435*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 10), "Marine Corps Day", cHolidayType_Half) 436*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Veteran's Day", cHolidayType_Full) 437*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 7), "Pearl Harbor Remembrance Day", cHolidayType_Half) 438*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Christmas Eve", cHolidayType_Half) 439*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Christmas Day", cHolidayType_Full) 440*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 31), "New Year's Eve", cHolidayType_Half) 441*cdf0e10cSrcweir 442*cdf0e10cSrcweir CalInsertBankholiday(CalEasterTable(YearInt), "Easter Sunday", cHolidayType_Half) 443*cdf0e10cSrcweir 444*cdf0e10cSrcweir ' Inauguration Day occurs every 4 years (1997, 2001) in the year following the presidential election 445*cdf0e10cSrcweir ' always on the 20th of January unless this is a Sunday in which case on Monday 21st January 446*cdf0e10cSrcweir If YearInt Mod 4 = 1 Then 447*cdf0e10cSrcweir lDate = DateSerial(YearInt, 1, 20) 448*cdf0e10cSrcweir If WeekDay(lDate) = 1 Then 449*cdf0e10cSrcweir CalInsertBankholiday(lDate + 1, "Inauguration Day", cHolidayType_Half) 450*cdf0e10cSrcweir Else 451*cdf0e10cSrcweir CalInsertBankholiday(lDate, "Inauguration Day", cHolidayType_Half) 452*cdf0e10cSrcweir End If 453*cdf0e10cSrcweir End If 454*cdf0e10cSrcweir ' First Tuesday in November, but only after the 1st of November and only on evenly numbered years 455*cdf0e10cSrcweir If YearInt Mod 2 = 0 Then 456*cdf0e10cSrcweir lFirstNov = DateSerial(YearInt, 11, 1) 457*cdf0e10cSrcweir lElectDate = GetMonthDate(YearInt, 11, 3, 0) 458*cdf0e10cSrcweir If lElectDate > lFirstNov Then 459*cdf0e10cSrcweir CalInsertBankholiday(lElectDate, "Election Day", cHolidayType_Half) 460*cdf0e10cSrcweir Else 461*cdf0e10cSrcweir CalInsertBankholiday(lElectDate + 7, "Election Day", cHolidayType_Half) 462*cdf0e10cSrcweir End If 463*cdf0e10cSrcweir End If 464*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 14), "Martin Luther King Jr Day", cHolidayType_Full) 465*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 2, 2, 14), "President's Day", cHolidayType_Full) 466*cdf0e10cSrcweir ' Mothers Day : 2nd Sunday in May, Full 467*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Mother's Day", cHolidayType_Full) 468*cdf0e10cSrcweir 469*cdf0e10cSrcweir ' Wednesday of the last full week of April Administrative Professionals' Day (formerly Secretaries' Day) 470*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, -7)-3, "Administrative Professionals' Day", cHolidayType_Half) 471*cdf0e10cSrcweir 472*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 5, 5, 0), "National Day of Prayer", cHolidayType_Half) 473*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, 14), "Armed Forces Day", cHolidayType_Half) 474*cdf0e10cSrcweir ' Fathers Day : 3rd Sunday in June 475*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), "Father's Day", cHolidayType_Half) 476*cdf0e10cSrcweir 477*cdf0e10cSrcweir ' Last Monday in May: Menorial Day, Full 478*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 6, 2, 0)-7, "Memorial Day", cHolidayType_Full) 479*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 7, 1, 21), "Parents' Day", cHolidayType_Half) 480*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 8, 1, 0), "Friendship Day", cHolidayType_Half) 481*cdf0e10cSrcweir 482*cdf0e10cSrcweir ' 1st Monday in Sep : Labor Day, Full 483*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0), "Labor Day", cHolidayType_Full) 484*cdf0e10cSrcweir ' Sunday after Labor Day Grandparents' Day 485*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0)+6, "Grandparents' Day", cHolidayType_Half) 486*cdf0e10cSrcweir 487*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 10, 1, 0), "National Children's Day", cHolidayType_Half) 488*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), "Columbus Day", cHolidayType_Full) 489*cdf0e10cSrcweir ' Sweetest Day: Third Saturday in October 490*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 10, 7, 14), "Sweetest Day", cHolidayType_Half) 491*cdf0e10cSrcweir ' 4th Thu in Nov : Thanksgiving, Full 492*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 11, 5, 21), "Thanksgiving", cHolidayType_Full) 493*cdf0e10cSrcweirEnd Sub 494*cdf0e10cSrcweir 495*cdf0e10cSrcweir 496*cdf0e10cSrcweirSub FindWholeYearHolidays_JP(ByVal YearInt as Integer) 497*cdf0e10cSrcweirDim lDate& 498*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "元日", cHolidayType_Full) 499*cdf0e10cSrcweir ' 2nd Monday in January 500*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 7), "成人の日", cHolidayType_Full) 501*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 2, 11), "建国記念の日", cHolidayType_Full) 502*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 20), "春分の日", cHolidayType_Full) 503*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 29), "みどりの日", cHolidayType_Full) 504*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 3), "憲法記念日", cHolidayType_Full) 505*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 4), "国民の休日", cHolidayType_Full) 506*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 5), "こどもの日", cHolidayType_Full) 507*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 9, 23), "秋分の日", cHolidayType_Full) 508*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), "体育の日", cHolidayType_Full) 509*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 3), "文化の日", cHolidayType_Full) 510*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 11, 23), "勤労感謝の日", cHolidayType_Full) 511*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 23), "天皇誕生日", cHolidayType_Full) 512*cdf0e10cSrcweir If YearInt > 2002 Then 513*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 7, 2, 14), "海の日", cHolidayType_Full) 514*cdf0e10cSrcweir CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 14), "敬老の日", cHolidayType_Full) 515*cdf0e10cSrcweir Else 516*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 7, 20), "海の日", cHolidayType_Full) 517*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 9, 15), "敬老の日", cHolidayType_Full) 518*cdf0e10cSrcweir End If 519*cdf0e10cSrcweirEnd Sub 520*cdf0e10cSrcweir 521*cdf0e10cSrcweir 522*cdf0e10cSrcweirSub FindWholeYearHolidays_TW(YearInt as Integer) 523*cdf0e10cSrcweir CalculateChineseNewYear(YearInt) 524*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "元旦", cHolidayType_Full) 525*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 2, 28), "和平紀念日", cHolidayType_Full) 526*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 8), "婦女節", cHolidayType_Half) 527*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 29), "革命先烈紀念日(青年節)", cHolidayType_Half) 528*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 4), "兒童節", cHolidayType_Half) 529*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 5), "民族掃墓節", cHolidayType_Full) 530*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "勞動節", cHolidayType_Full) 531*cdf0e10cSrcweir CalInsertBankholiday(GetNextWeekDay(YearInt, 5, 19, 2), "佛陀誕辰紀念日", cHolidayType_Full) ' Just like Columbus Day 532*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 15), "端午節", cHolidayType_Full) 533*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 9, 3), "軍人節", cHolidayType_Half) 534*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 9, 21), "中秋節", cHolidayType_Full) 535*cdf0e10cSrcweir CalInsertBankholiday(GetNextWeekDay(YearInt, 9, 28, 2), "孔子誕辰紀念日(教師節)", cHolidayType_Full) ' Just like Columnbusday 536*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 10), "國慶日", cHolidayType_Full) 537*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 25), "臺灣光復節", cHolidayType_Half) 538*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 31), "先總統 蔣公誕辰紀念日", cHolidayType_Half) 539*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 11), "國父誕辰紀念日(中華文化復興節)", cHolidayType_Half) 540*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 12, 25), "行憲紀念日", cHolidayType_Half) 541*cdf0e10cSrcweirEnd Sub 542*cdf0e10cSrcweir 543*cdf0e10cSrcweir 544*cdf0e10cSrcweirSub FindWholeYearHolidays_CN(YearInt as Integer) 545*cdf0e10cSrcweir CalculateChineseNewYear(YearInt) 546*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 1, 1), "元旦", cHolidayType_Full) ' New Year 547*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 3, 8), "妇女节", cHolidayType_Half) ' Women's Day 548*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 4, 5), "清明节", cHolidayType_Half) ' Day of the deads 549*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 5, 1), "劳动节", cHolidayType_Full) ' International Labour Day 550*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 6, 1), "儿童节", cHolidayType_Half) ' Children's Day 551*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 8, 1), "建军节", cHolidayType_Half) ' Foundation of military 552*cdf0e10cSrcweir CalInsertBankholiday(DateSerial(YearInt, 10, 1), "国庆节", cHolidayType_Full) ' National festival day 553*cdf0e10cSrcweirEnd Sub 554*cdf0e10cSrcweir 555*cdf0e10cSrcweir 556*cdf0e10cSrcweir' Unfortunately I could not find a Routine to convert a 'Moon Date' into a gregorian date 557*cdf0e10cSrcweirSub CalculateChineseNewYear(iSelYear as Integer) 558*cdf0e10cSrcweirDim lDate as Long 559*cdf0e10cSrcweir Select Case iSelYear 560*cdf0e10cSrcweir Case 1995 561*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 31) 562*cdf0e10cSrcweir Case 1996 563*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 2, 19) 564*cdf0e10cSrcweir Case 1997 565*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 2, 7) 566*cdf0e10cSrcweir Case 1998 567*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 28) 568*cdf0e10cSrcweir Case 1999 569*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 16) 570*cdf0e10cSrcweir Case 2000 571*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 5) 572*cdf0e10cSrcweir Case 2001 573*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 24) 574*cdf0e10cSrcweir Case 2002 575*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 12) 576*cdf0e10cSrcweir Case 2003 577*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 1) 578*cdf0e10cSrcweir Case 2004 579*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 22) 580*cdf0e10cSrcweir Case 2005 581*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 9) 582*cdf0e10cSrcweir Case 2006 583*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 29) 584*cdf0e10cSrcweir Case 2007 585*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 18) 586*cdf0e10cSrcweir Case 2008 587*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 7) 588*cdf0e10cSrcweir Case 2009 589*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 26) 590*cdf0e10cSrcweir Case 2010 591*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 10) 592*cdf0e10cSrcweir Case 2011 593*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 3) 594*cdf0e10cSrcweir Case 2012 595*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 23) 596*cdf0e10cSrcweir Case 2013 597*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 10) 598*cdf0e10cSrcweir Case 2014 599*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 31) 600*cdf0e10cSrcweir Case 2015 601*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 19) 602*cdf0e10cSrcweir Case 2016 603*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 9) 604*cdf0e10cSrcweir Case 2017 605*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 28) 606*cdf0e10cSrcweir Case 2018 607*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 16) 608*cdf0e10cSrcweir Case 2019 609*cdf0e10cSrcweir lDate = DateSerial(iSelYear,2, 5) 610*cdf0e10cSrcweir Case 2020 611*cdf0e10cSrcweir lDate = DateSerial(iSelYear, 1, 25) 612*cdf0e10cSrcweir Case Else 613*cdf0e10cSrcweir Exit Sub 614*cdf0e10cSrcweir End Select 615*cdf0e10cSrcweir Select Case sCurCountryLocale 616*cdf0e10cSrcweir Case "CN" 617*cdf0e10cSrcweir CalInsertBankholiday(lDate-1, "农历除夕", cHolidayType_Full) 618*cdf0e10cSrcweir CalInsertBankholiday(lDate, "春节初一", cHolidayType_Full) 619*cdf0e10cSrcweir CalInsertBankholiday(lDate+1, "春节初二", cHolidayType_Full) 620*cdf0e10cSrcweir CalInsertBankholiday(lDate+2, "春节初三", cHolidayType_Full) 621*cdf0e10cSrcweir 622*cdf0e10cSrcweir Case Else 623*cdf0e10cSrcweir CalInsertBankholiday(lDate-1, "農曆除夕", cHolidayType_Full) 624*cdf0e10cSrcweir CalInsertBankholiday(lDate, "春節初一", cHolidayType_Full) 625*cdf0e10cSrcweir CalInsertBankholiday(lDate+1, "春節初二", cHolidayType_Full) 626*cdf0e10cSrcweir CalInsertBankholiday(lDate+2, "春節初三", cHolidayType_Full) 627*cdf0e10cSrcweir End Select 628*cdf0e10cSrcweirEnd Sub 629*cdf0e10cSrcweir 630*cdf0e10cSrcweir 631*cdf0e10cSrcweirFunction CalculateJapaneseSpringDay(iSelYear as Integer) 632*cdf0e10cSrcweir If (iSelYear > 1979) And (iSelYear < 2100) Then 633*cdf0e10cSrcweir CalculateJapaneseSpringDay() = Int(20.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4)) 634*cdf0e10cSrcweir End If 635*cdf0e10cSrcweirEnd Function 636*cdf0e10cSrcweir 637*cdf0e10cSrcweir 638*cdf0e10cSrcweirFunction CalculateJapaneseAutumnDay(iSelYear as Integer) 639*cdf0e10cSrcweir If (iSelYear > 1979) And (iSelYear < 2100) Then 640*cdf0e10cSrcweir CalculateJapaneseAutumnDay() = Int(23.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4)) 641*cdf0e10cSrcweir End If 642*cdf0e10cSrcweirEnd Function</script:module>