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