home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 125
/
Freelog_MarsAvril2015_No125.iso
/
Bureautique
/
OpenOffice
/
Apache_OpenOffice_4.1.1_Win_x86_install_fr.exe
/
openoffice1.cab
/
LocalHolidays.xba
< prev
next >
Wrap
Extensible Markup Language
|
2014-02-25
|
38KB
|
663 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="LocalHolidays" script:language="StarBasic">Option Explicit
Sub Main
Call CalAutopilotTable()
End Sub
Sub FindWholeYearHolidays_FRANCE(ByVal YearInt as Integer)
Dim lEasterDate&
Dim lDate&
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Jour de l'an", cHolidayType_Full)
lEasterDate = CalEasterTable(YearInt)
CalInsertBankholiday(lEasterDate, "Pâques", cHolidayType_Full)
CalInsertBankholiday(lEasterDate + 1, "Lundi de Pâques", cHolidayType_Full)
CalInsertBankholiday(lEasterDate + 39, "Ascension", cHolidayType_Full)
CalInsertBankholiday(lEasterDate + 49, "Pentec├┤te", cHolidayType_Full)
CalInsertBankholiday(lEasterDate + 50, "Lundi de Pentec├┤te", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Fête du travail", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 8), "Victoire 1945", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 7, 14), "Fête Nationale", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Assomption", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Toussaint", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Armistice ou Victoire 1918", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Noël", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_SWED(ByVal YearInt as Integer)
Dim lDate&
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nyårsdagen", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trettondagen", cHolidayType_Full)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate - 2, "Långfredagen", cHolidayType_Full)
CalInsertBankholiday(lDate, "Påskdagen", cHolidayType_Full)
CalInsertBankholiday(lDate + 1, "Annandag påsk", cHolidayType_Full)
CalInsertBankholiday(lDate + 39, "Kristi himmelfärds dag", cHolidayType_Full)
CalInsertBankholiday(lDate + 49, "Pingstdagen", cHolidayType_Full)
CalInsertBankholiday(lDate + 50, "Annandag pingst", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "1:a maj", cHolidayType_Full)
' MidSummerfeast (next Sunday after 20th June)
CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), "Midsommardagen", cHolidayType_Full)
CalInsertBankholiday(GetNextWeekDay(YearInt, 10, 31, 7), "Alla helgons dag", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Juldagen", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Annandag jul", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_FI(ByVal YearInt as Integer)
Dim OsternDate&
' New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Uudenvuodenpäivä", cHolidayType_Full)
' "the three Magi"
CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Loppiainen", cHolidayType_Half)
OsternDate = CalEasterTable(YearInt)
CalInsertBankholiday(OsternDate-2, "Pitkäperjantai", cHolidayType_Full)
CalInsertBankholiday(OsternDate, "Pääsiäispäivä", cHolidayType_Full)
CalInsertBankholiday(OsternDate+1, "2. pääsiäispäivä", cHolidayType_Full)
' Ascension Day
CalInsertBankholiday(OsternDate+39, "Helatorstai", cHolidayType_Full)
' First of May
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Vappu, suomalaisen työn päivä", cHolidayType_Full)
' Mothers Day : 2nd Sunday in May, Full
CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Äitienpäivä", cHolidayType_Full)
' MidSummerfeast (next Sunday after 20th June)
CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), "Juhannus, Suomen lipun päivä", cHolidayType_Full)
' Independance day
CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Itsenäisyyspäivä", cHolidayType_Full)
' Christmas
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Joulupäivä", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Tapaninpäivä", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_DK (ByVal YearInt as Integer)
Dim lDate&, VierterAdvent&
'New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nytårsdag", cHolidayType_Full)
lDate = CalEasterTable (YearInt)
' carnival
CalInsertBankholiday(lDate-49, "Fastelavn", cHolidayType_Half)
'"Maundy Tuesday
CalInsertBankholiday(lDate-3, "Skærtorsdag", cHolidayType_Full)
'"Good Friday "
CalInsertBankholiday(lDate-2, "Langfredag", cHolidayType_Full)
' Easter Sunday
CalInsertBankholiday(lDate, "Påskesøndag", cHolidayType_Full)
' Easter Monday
CalInsertBankholiday(lDate+1, "2. påskedag", cHolidayType_Full)
' 4th Friday after Easter
CalInsertBankholiday(lDate+26, "Store bededag", cHolidayType_Full)
' "Ascension Day
CalInsertBankholiday(lDate+39, "Kristi himmelfahrt", cHolidayType_Full)
' "Whitsunday"
CalInsertBankholiday(lDate+49, "Pinses├╕ndag", cHolidayType_Full)
' "Whitmonday"
CalInsertBankholiday(lDate+50, "2. pinsedag", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 6, 5), "Grundlovsdag", cHolidayType_Full)
'Christmas Days
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "1. juledag", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), "2. juledag", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Hellig 3 konger", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 3, 28), "Dr. Ingrid", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 16), "Dr. Margrete", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 16), "Palmes├╕ndag", cHolidayType_Half)
' "Liberation day"
CalInsertBankholiday(DateSerial(YearInt, 5, 5), "Befrielsesdag", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 5, 26), "Krpr. Frederik", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 7), "Pr. Joachim", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 11), "Pr. Henrik", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 15), "Valdemarsdag", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 24), "Skt. Hans", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 30), "Prinsesse Alexandra", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 8, 28), "Pr. Nikolai", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 24), "FN-dag", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Morten Bisp", cHolidayType_Half)
' all half (Memorial Days)
'"adventdays
VierterAdvent = DateSerial(YearInt, 12, 24)
While (Weekday(VierterAdvent) <> 1)
vierterAdvent = vierterAdvent - 1
Wend
CalInsertBankholiday(vierterAdvent-21, "1. s├╕ndag i advent", cHolidayType_Half)
CalInsertBankholiday(vierterAdvent-14, "2. s├╕ndag i advent", cHolidayType_Half)
CalInsertBankholiday(vierterAdvent-7, "3. s├╕ndag i advent", cHolidayType_Half)
CalInsertBankholiday(vierterAdvent, "4. s├╕ndag i advent", cHolidayType_Half)
'Christmas eve
CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Juleaften", cHolidayType_Half)
'"New Year's eve"
CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Nytårsaften", cHolidayType_Half)
End Sub
Sub FindWholeYearHolidays_ITA(ByVal YearInt as Integer)
Dim lDate&
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Capodanno", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Epifania", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 4, 25), "Festa della liberazione", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Ferragusto", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Tutti i Santi", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 8), "Immacolata concezione", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Natale", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Santo Stefano", cHolidayType_Full)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate, "Pasqua", cHolidayType_Full)
CalInsertBankholiday(lDate+1, "Lunedì dell'Angelo", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_TRK(ByVal YearInt as Integer)
Dim lDate as Long
' New Years' Day
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Yılbaşı", cHolidayType_Full)
' National Sovereignty and Children's Day
CalInsertBankholiday(DateSerial(YearInt, 4, 23), "Ulusal Egemenlik ve Çocuk Bayramı", cHolidayType_Full)
' Ataturk Commemoration and Youth & Sports Day
CalInsertBankholiday(DateSerial(YearInt, 5, 19), "Atatürk'ü Anma, Gençlik ve Spor Bayramı", cHolidayType_Full)
' Mothers Day : 2nd Sunday in May, Full
CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Anneler g├╝n├╝", cHolidayType_Full)
' Fathers Day: 3rd Sunday in May, Full
CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), "Babalar G├╝n├╝", cHolidayType_Full)
' Victory Day
CalInsertBankholiday(DateSerial(YearInt, 8, 30), "Zafer Bayram─▒", cHolidayType_Full)
' Republic Day
CalInsertBankholiday(DateSerial(YearInt, 10, 28), "Cumhuriyet Bayram─▒", cHolidayType_Full)
' Republic Day
CalInsertBankholiday(DateSerial(YearInt, 10, 29), "Cumhuriyet Bayram─▒", cHolidayType_Full)
' Commemoration Of Ataturk-Anniversary of Ataturk's Death
CalInsertBankholiday(DateSerial(YearInt, 11, 10), "Atatürk'ün Ölüm Günü", cHolidayType_Full)
CalculateturkishReligousHolidays(YearInt)
End Sub
Sub CalculateturkishReligousHolidays(iSelYear as Integer)
Dim lKurbanBayRamStartDate as Long
Dim lRamazanBayRamStartDate as Long
Select Case iSelYear
Case 2002
lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 21)
lRamazanBayRamStartDate = DateSerial(iSelYear, 12, 4)
Case 2003
lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 10)
lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 24)
Case 2004
lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 31)
lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 13)
Case 2005
lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 19)
lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 2)
Case 2006
lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 30)
CalInsertBankholiday(lKurbanBayRamStartDate, "Kurban Bayram─▒ Arefesi", cHolidayType_Half)
CalInsertBankholiday(DateSerial(iSelYear, 12, 31), "Kurban Bayram", cHolidayType_Full)
lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 9)
lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 22)
Case 2007
lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 1)
' Note: The first day has already been in 2006!!!
AddFollowUpHolidays(lKurbanBayRamStartDate-1, 3, "Kurban Bayram", cHolidayType_Full)
lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 19)
lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 11)
Case 2008
lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 7)
lRamazanBayRamStartDate = DateSerial(iSelYear, 9, 29)
Case Else
Exit Sub
End Select
'Feast Of the Sacrifice Eve
CalInsertBankholiday(lKurbanBayRamStartDate, "Kurban Bayram─▒ Arefesi", cHolidayType_Half)
'Feast Of the Sacrifice
AddFollowUpHolidays(lKurbanBayRamStartDate, 4, "Kurban Bayram", cHolidayType_Full)
' End of Ramadan Eve
CalInsertBankholiday(lRamazanBayRamStartDate, "Ramazan (Şeker) Bayramı Arefesi", cHolidayType_Half)
' End of Ramadan
AddFollowUpHolidays(lRamazanBayRamStartDate, 3, "Ramazan (Şeker) Bayramı", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_GREEK(ByVal YearInt as Integer)
Dim lDate as Long
' New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Πρωτοχρονιά", cHolidayType_Full)
'Schol Holiday
CalInsertBankholiday(DateSerial(YearInt, 12, 30), "Τριών Ιεραρχών", cHolidayType_Full)
' This is both a National Holiday and a religious holiday
CalInsertBankholiday(DateSerial(YearInt, 3, 25), "Εθνική Εορτή Ευαγγελισμός Θεοτόκου", cHolidayType_Full)
' Labor Day
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Πρωτομαγιά", cHolidayType_Full)
' Assumption Day
CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Κοίμηση της Θεοτόκου", cHolidayType_Full)
' National Resistance Day
CalInsertBankholiday(DateSerial(YearInt, 10, 28), "Εθνική Εορτή", cHolidayType_Full)
' School Holiday
CalInsertBankholiday(DateSerial(YearInt, 11, 17), "Επέτειος του Πολυτεχνείου", cHolidayType_Full)
' Christmas Eve
CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Παραμονή Χριστουγέννων", cHolidayType_Full)
' Christmas Day
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Χριστούγεννα", cHolidayType_Full)
' Boxing Day
CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Δεύτερη μέρα Χριστουγέννων", cHolidayType_Full)
lDate = CalOrthodoxEasterTable(YearInt)
' Triodon
CalInsertBankholiday(lDate-70, "Αρχή Τριωδίου", cHolidayType_Full)
' Meat Fare
CalInsertBankholiday(lDate-56, "Τσικνοπέμπτη", cHolidayType_Full)
' First Day of Lent
CalInsertBankholiday(lDate-48, "Καθαρή Δευτέρα", cHolidayType_Full)
' Saturday of Lazarus
CalInsertBankholiday(lDate-8, "Σάββατο του Λαζάρου", cHolidayType_Full)
' Palm Sunday
CalInsertBankholiday(lDate-7, "Κυριακή των Βαΐων", cHolidayType_Full)
' Monday before Easter
CalInsertBankholiday(lDate-6, "Μεγάλη Δευτέρα", cHolidayType_Full)
' Tuesday before Easter
CalInsertBankholiday(lDate-5, "Μεγάλη Τρίτη", cHolidayType_Full)
' Wednesday before Easter
CalInsertBankholiday(lDate-4, "Μεγάλη Τετάρτη", cHolidayType_Full)
' Thursday before Easter
CalInsertBankholiday(lDate-3, "Μεγάλη Πέμπτη", cHolidayType_Full)
' Good Friday
CalInsertBankholiday(lDate-2, "Μεγάλη Παρασκευή", cHolidayType_Full)
' Saturday before Easter
CalInsertBankholiday(lDate-1, "Μεγάλο Σάββατο", cHolidayType_Full)
' Easter Monday
CalInsertBankholiday(lDate+1, "Δευτέρα του Πάσχα", cHolidayType_Full)
' Pentecost
CalInsertBankholiday(lDate+49, "Κυριακή της Πεντηκοστής", cHolidayType_Full)
' Ascension Day
CalInsertBankholiday(lDate+39, "Του Αγίου Πνεύματος", cHolidayType_Full)
' All Saints Day
CalInsertBankholiday(lDate+56, "Των Αγίων Πάντων", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_SPAIN(ByVal YearInt as Integer)
Dim lDate&
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "A├▒o Nuevo", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Reyes", cHolidayType_Full)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate-2, "Viernes Santo", cHolidayType_Full)
CalInsertBankholiday(lDate+1, "Lunes de Pascua Florida", cHolidayType_Full)
CalInsertBankholiday(lDate+39, "Día de la Ascensión", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Fiesta del Trabajo", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Día de la Asunción", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 10, 12), "Fiesta de la Hispanidad", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Todos los Santos", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Día de la Constitución", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 8), "La Inmaculada", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Navidad", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_PORT(ByVal YearInt as Integer)
Dim lDate&
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Ano Novo", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Reis Magos", cHolidayType_Half)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate-47, "Carnaval", cHolidayType_Full)
CalInsertBankholiday(lDate-7, "Domingo de Ramos", cHolidayType_Half)
CalInsertBankholiday(lDate-2, "Sexta-feira Santa", cHolidayType_Full)
CalInsertBankholiday(lDate, "Páscoa", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 4, 25), "25 de Abril", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Dia do Trabalhador", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 29), "Corpo de Deus", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 6, 10), "Dia de Cam├╡es e das Comunidades Portuguesas", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 6, 24), "S. João", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 6, 29), "S. Pedro", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Assunção de Nossa Senhora", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 10, 5), "Implantação da República", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Dia de Todos os Santos", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 8), "Imaculada Conceição", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Natal", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 1), "Restauração da Independência", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Passagem de Ano", cHolidayType_Half)
End Sub
Sub FindWholeYearHolidays_NL(ByVal YearInt as Integer)
Dim lDate&
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nieuwjaarsdag", cHolidayType_Full)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate, "1e Paasdag", cHolidayType_Full)
CalInsertBankholiday(lDate + 1, "2e Paasdag", cHolidayType_Full)
CalInsertBankholiday(lDate + 39, "Hemelvaartsdag", cHolidayType_Full)
CalInsertBankholiday(lDate + 49, "1e Pinksterdag", cHolidayType_Full)
CalInsertBankholiday(lDate + 50, "2e Pinksterdag", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 4, 30), "Koninginnedag", cHolidayType_Full)
' Bevrijdingsdag is celebrated every 5th year
If YearInt Mod 5 = 0 then
CalInsertBankholiday(DateSerial(YearInt, 5, 5), "Bevrijdingsdag", cHolidayType_Full)
End if
CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Sinterklaas", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "1e Kerstdag", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), "2e Kerstdag", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_PL (ByVal YearInt as Integer)
Dim lDate&, OsternDate&
' New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nowy Rok", cHolidayType_Full)
' "the three Magi"
CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trzech Kr├│li", cHolidayType_Half)
' "Womens' Day"
CalInsertBankholiday(DateSerial(YearInt, 3, 8), "Dzień Kobiet", cHolidayType_Half)
OsternDate = CalEasterTable(YearInt)
CalInsertBankholiday(OsternDate-2, "Wielki Pi─àtek", cHolidayType_Full)
CalInsertBankholiday(OsternDate, "Wielka Niedziela", cHolidayType_Full)
CalInsertBankholiday(OsternDate+1, "Lany Poniedziałek", cHolidayType_Full)
' Ascension Day
CalInsertBankholiday(OsternDate+39, "Wniebowst─àpienie", cHolidayType_Full)
' Pentecost
CalInsertBankholiday(OsternDate+49, "Zielone Świątki", cHolidayType_Full)
' Feast of Corpus Christi
CalInsertBankholiday(OsternDate+60, "Boże Ciało", cHolidayType_Full)
' First of May
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Święto pracy", cHolidayType_Full)
' Memorial day of constitution
CalInsertBankholiday(DateSerial(YearInt, 5, 3), "Dzień konstytucji 3-go maja", cHolidayType_Full)
' "Childrens' day"
CalInsertBankholiday(DateSerial(YearInt, 6, 1), "Dzień Dziecka", cHolidayType_Half)
' "Ascension Day"
CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Matki Boskiej Zielnej", cHolidayType_Half)
' "All Saints' Day "
CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Wszystkich Świętych", cHolidayType_Full)
' National day"
CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Dzień Niepodległości", cHolidayType_Full)
' Christmas Eve
CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Wigilia", cHolidayType_Half)
' Christmas
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Bo┼╝e Narodzenie", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Bo┼╝e Narodzenie", cHolidayType_Full)
' "New Year's eve"
CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Sylwester", cHolidayType_Half)
End Sub
Sub FindWholeYearHolidays_RU (ByVal YearInt as Integer)
Dim lDate&
' New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Новый Год", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 2), "Новый Год", cHolidayType_Full)
' Russian Christmas"
CalInsertBankholiday(DateSerial(YearInt, 1, 7), "Рождество", cHolidayType_Full)
'Day of Defender of Motherland
CalInsertBankholiday(DateSerial(YearInt, 2, 23), "День Защитника Отечества", cHolidayType_Full)
' Woman Day
CalInsertBankholiday(DateSerial(YearInt, 3, 8), "Международный Женский День", cHolidayType_Full)
' Spring and labor holiday
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Праздник Весны и Труда", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 2), "Праздник Весны и Труда", cHolidayType_Full)
' Victory of the second World War
CalInsertBankholiday(DateSerial(YearInt, 5, 9), "День Победы", cHolidayType_Full)
' Independence Day
CalInsertBankholiday(DateSerial(YearInt, 6, 12), "День Независимости", cHolidayType_Full)
' Day of Accord and Conciliation
CalInsertBankholiday(DateSerial(YearInt, 11, 7), "День Согласия и Примирения", cHolidayType_Full)
' Constitution Day
CalInsertBankholiday(DateSerial(YearInt, 12, 12), "День Конституции", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_US(ByVal YearInt as Integer)
Dim lDate as Long
Dim lFirstNov as Long
Dim lElectDate as Long
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "New Year's Day", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 2, 2), "Groundhog Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 2, 14), "Valentine's Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 3, 17), "St Patrick's Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 1), "April Fools' Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 22), "Earth Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 5, 6), "Nurses' Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 14), "Flag Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 14), "Army Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 19), "Juneteenth(Liberation of Slaves)", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 7, 4), "Independence Day", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 1), "Air Force Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 8, 4), "Coast Guard Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 9, 17), "Citizenship Day or Constitution Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 16), "Bosses' Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 26 ), "Mother-in-Law's Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 27), "Navy Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 31), "Halloween", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 11, 10), "Marine Corps Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Veteran's Day", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 7), "Pearl Harbor Remembrance Day", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Christmas Eve", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Christmas Day", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 31), "New Year's Eve", cHolidayType_Half)
CalInsertBankholiday(CalEasterTable(YearInt), "Easter Sunday", cHolidayType_Half)
' Inauguration Day occurs every 4 years (1997, 2001) in the year following the presidential election
' always on the 20th of January unless this is a Sunday in which case on Monday 21st January
If YearInt Mod 4 = 1 Then
lDate = DateSerial(YearInt, 1, 20)
If WeekDay(lDate) = 1 Then
CalInsertBankholiday(lDate + 1, "Inauguration Day", cHolidayType_Half)
Else
CalInsertBankholiday(lDate, "Inauguration Day", cHolidayType_Half)
End If
End If
' First Tuesday in November, but only after the 1st of November and only on evenly numbered years
If YearInt Mod 2 = 0 Then
lFirstNov = DateSerial(YearInt, 11, 1)
lElectDate = GetMonthDate(YearInt, 11, 3, 0)
If lElectDate > lFirstNov Then
CalInsertBankholiday(lElectDate, "Election Day", cHolidayType_Half)
Else
CalInsertBankholiday(lElectDate + 7, "Election Day", cHolidayType_Half)
End If
End If
CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 14), "Martin Luther King Jr Day", cHolidayType_Full)
CalInsertBankholiday(GetMonthDate(YearInt, 2, 2, 14), "President's Day", cHolidayType_Full)
' Mothers Day : 2nd Sunday in May, Full
CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Mother's Day", cHolidayType_Full)
' Wednesday of the last full week of April Administrative Professionals' Day (formerly Secretaries' Day)
CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, -7)-3, "Administrative Professionals' Day", cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 5, 5, 0), "National Day of Prayer", cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, 14), "Armed Forces Day", cHolidayType_Half)
' Fathers Day : 3rd Sunday in June
CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), "Father's Day", cHolidayType_Half)
' Last Monday in May: Menorial Day, Full
CalInsertBankholiday(GetMonthDate(YearInt, 6, 2, 0)-7, "Memorial Day", cHolidayType_Full)
CalInsertBankholiday(GetMonthDate(YearInt, 7, 1, 21), "Parents' Day", cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 8, 1, 0), "Friendship Day", cHolidayType_Half)
' 1st Monday in Sep : Labor Day, Full
CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0), "Labor Day", cHolidayType_Full)
' Sunday after Labor Day Grandparents' Day
CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0)+6, "Grandparents' Day", cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 10, 1, 0), "National Children's Day", cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), "Columbus Day", cHolidayType_Full)
' Sweetest Day: Third Saturday in October
CalInsertBankholiday(GetMonthDate(YearInt, 10, 7, 14), "Sweetest Day", cHolidayType_Half)
' 4th Thu in Nov : Thanksgiving, Full
CalInsertBankholiday(GetMonthDate(YearInt, 11, 5, 21), "Thanksgiving", cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_JP(ByVal YearInt as Integer)
Dim lDate&
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "σàâµùÑ", cHolidayType_Full)
' 2nd Monday in January
CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 7), "成人の日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 2, 11), "建国記念の日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 3, 20), "春分の日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 4, 29), "みどりの日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 3), "憲法記念日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 4), "国民の休日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 5), "こどもの日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 9, 23), "秋分の日", cHolidayType_Full)
CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), "体育の日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 3), "文化の日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 23), "勤労感謝の日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 23), "天皇誕生日", cHolidayType_Full)
If YearInt > 2002 Then
CalInsertBankholiday(GetMonthDate(YearInt, 7, 2, 14), "海の日", cHolidayType_Full)
CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 14), "敬老の日", cHolidayType_Full)
Else
CalInsertBankholiday(DateSerial(YearInt, 7, 20), "海の日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 9, 15), "敬老の日", cHolidayType_Full)
End If
End Sub
Sub FindWholeYearHolidays_TW(YearInt as Integer)
CalculateChineseNewYear(YearInt)
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "σàâµùª", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 2, 28), "和平紀念日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 3, 8), "婦女節", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 3, 29), "革命先烈紀念日(青年節)", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 4), "兒童節", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 5), "民族掃墓節", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "勞動節", cHolidayType_Full)
CalInsertBankholiday(GetNextWeekDay(YearInt, 5, 19, 2), "佛陀誕辰紀念日", cHolidayType_Full) ' Just like Columbus Day
CalInsertBankholiday(DateSerial(YearInt, 6, 15), "端午節", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 9, 3), "軍人節", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 9, 21), "中秋節", cHolidayType_Full)
CalInsertBankholiday(GetNextWeekDay(YearInt, 9, 28, 2), "孔子誕辰紀念日(教師節)", cHolidayType_Full) ' Just like Columnbusday
CalInsertBankholiday(DateSerial(YearInt, 10, 10), "國慶日", cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 10, 25), "臺灣光復節", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 31), "先總統 蔣公誕辰紀念日", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 11), "國父誕辰紀念日(中華文化復興節)", cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), "行憲紀念日", cHolidayType_Half)
End Sub
Sub FindWholeYearHolidays_CN(YearInt as Integer)
CalculateChineseNewYear(YearInt)
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "σàâµùª", cHolidayType_Full) ' New Year
CalInsertBankholiday(DateSerial(YearInt, 3, 8), "妇女节", cHolidayType_Half) ' Women's Day
CalInsertBankholiday(DateSerial(YearInt, 4, 5), "清明节", cHolidayType_Half) ' Day of the deads
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "劳动节", cHolidayType_Full) ' International Labour Day
CalInsertBankholiday(DateSerial(YearInt, 6, 1), "儿童节", cHolidayType_Half) ' Children's Day
CalInsertBankholiday(DateSerial(YearInt, 8, 1), "建军节", cHolidayType_Half) ' Foundation of military
CalInsertBankholiday(DateSerial(YearInt, 10, 1), "国庆节", cHolidayType_Full) ' National festival day
End Sub
' Unfortunately I could not find a Routine to convert a 'Moon Date' into a gregorian date
Sub CalculateChineseNewYear(iSelYear as Integer)
Dim lDate as Long
Select Case iSelYear
Case 1995
lDate = DateSerial(iSelYear, 1, 31)
Case 1996
lDate = DateSerial(iSelYear, 2, 19)
Case 1997
lDate = DateSerial(iSelYear, 2, 7)
Case 1998
lDate = DateSerial(iSelYear, 1, 28)
Case 1999
lDate = DateSerial(iSelYear,2, 16)
Case 2000
lDate = DateSerial(iSelYear,2, 5)
Case 2001
lDate = DateSerial(iSelYear, 1, 24)
Case 2002
lDate = DateSerial(iSelYear,2, 12)
Case 2003
lDate = DateSerial(iSelYear,2, 1)
Case 2004
lDate = DateSerial(iSelYear, 1, 22)
Case 2005
lDate = DateSerial(iSelYear,2, 9)
Case 2006
lDate = DateSerial(iSelYear, 1, 29)
Case 2007
lDate = DateSerial(iSelYear,2, 18)
Case 2008
lDate = DateSerial(iSelYear,2, 7)
Case 2009
lDate = DateSerial(iSelYear, 1, 26)
Case 2010
lDate = DateSerial(iSelYear,2, 10)
Case 2011
lDate = DateSerial(iSelYear,2, 3)
Case 2012
lDate = DateSerial(iSelYear, 1, 23)
Case 2013
lDate = DateSerial(iSelYear,2, 10)
Case 2014
lDate = DateSerial(iSelYear, 1, 31)
Case 2015
lDate = DateSerial(iSelYear,2, 19)
Case 2016
lDate = DateSerial(iSelYear,2, 9)
Case 2017
lDate = DateSerial(iSelYear, 1, 28)
Case 2018
lDate = DateSerial(iSelYear,2, 16)
Case 2019
lDate = DateSerial(iSelYear,2, 5)
Case 2020
lDate = DateSerial(iSelYear, 1, 25)
Case Else
Exit Sub
End Select
Select Case sCurCountryLocale
Case "CN"
CalInsertBankholiday(lDate-1, "农历除夕", cHolidayType_Full)
CalInsertBankholiday(lDate, "春节初一", cHolidayType_Full)
CalInsertBankholiday(lDate+1, "春节初二", cHolidayType_Full)
CalInsertBankholiday(lDate+2, "春节初三", cHolidayType_Full)
Case Else
CalInsertBankholiday(lDate-1, "農曆除夕", cHolidayType_Full)
CalInsertBankholiday(lDate, "春節初一", cHolidayType_Full)
CalInsertBankholiday(lDate+1, "春節初二", cHolidayType_Full)
CalInsertBankholiday(lDate+2, "春節初三", cHolidayType_Full)
End Select
End Sub
Function CalculateJapaneseSpringDay(iSelYear as Integer)
If (iSelYear > 1979) And (iSelYear < 2100) Then
CalculateJapaneseSpringDay() = Int(20.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
End If
End Function
Function CalculateJapaneseAutumnDay(iSelYear as Integer)
If (iSelYear > 1979) And (iSelYear < 2100) Then
CalculateJapaneseAutumnDay() = Int(23.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
End If
End Function</script:module>