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