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