office-gobmx/wizards/source/schedule/LocalHolidays.xba

506 lines
29 KiB
Text
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
2001-12-17 08:02:48 -06:00
<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&amp;
Dim lDate&amp;
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Jour de l&apos;an&quot;, cHolidayType_Full)
lEasterDate = CalEasterTable(YearInt)
CalInsertBankholiday(lEasterDate, &quot;Pâques&quot;, cHolidayType_Full)
CalInsertBankholiday(lEasterDate + 10, &quot;Pentecôte&quot;, cHolidayType_Full)
CalInsertBankholiday(lEasterDate + 39, &quot;Ascension&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Fête du travail&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 8), &quot;Victoire 1945&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 7, 14), &quot;Fête Nationale&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Assomption&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Toussaint&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Armistice ou Victoire 1918&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Noël&quot;, cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_SWED(ByVal YearInt as Integer)
Dim lDate&amp;
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nyårsdagen&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Trettondagen&quot;, cHolidayType_Full)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate - 2, &quot;Långfredagen&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate, &quot;Påskdagen&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate + 1, &quot;Annandag påsk&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate + 39, &quot;Kristi himmelfärds dag&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate + 49, &quot;Pingstdagen&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate + 50, &quot;Annandag pingst&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;1:a maj&quot;, cHolidayType_Full)
lDate = DateSerial(YearInt, 6, 20)
While (Weekday(lDate) &lt;&gt; 7) &apos; Saturday
lDate = lDate + 1
Wend
CalInsertBankholiday(lDate, &quot;Midsommardagen&quot;, cHolidayType_Full)
lDate = DateSerial(YearInt, 10, 31)
While (Weekday(lDate) &lt;&gt; 7) &apos; Saturday
lDate = lDate + 1
Wend
CalInsertBankholiday(lDate, &quot;Alla helgons dag&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Juldagen&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Annandag jul&quot;, cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_DK (ByVal YearInt as Integer)
Dim lDate&amp;, VierterAdvent&amp;
&apos;New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nytårsdag&quot;, cHolidayType_Full)
lDate = CalEasterTable (YearInt)
&apos;&quot;Fasching&quot;
CalInsertBankholiday(lDate-49, &quot;Fastelavn&quot;, cHolidayType_Half)
&apos;&quot;Gründonnerstag&quot;
CalInsertBankholiday(lDate-3, &quot;Skærtorsdag&quot;, cHolidayType_Full)
&apos;&quot;Karfreitag&quot;
CalInsertBankholiday(lDate-2, &quot;Langfredag&quot;, cHolidayType_Full)
&apos; Easter Sunday
CalInsertBankholiday(lDate, &quot;Påskesøndag&quot;, cHolidayType_Full)
&apos; Easter Monday
CalInsertBankholiday(lDate+1, &quot;2. påskedag&quot;, cHolidayType_Full)
&apos; 4th Friday after Easter
CalInsertBankholiday(lDate+26, &quot;Store bededag&quot;, cHolidayType_Full)
&apos; &quot;Christi Himmelfahrt
CalInsertBankholiday(lDate+39, &quot;Kristi himmelfahrt&quot;, cHolidayType_Full)
&apos; &quot;Pfingstsonntag&quot;
CalInsertBankholiday(lDate+49, &quot;Pinsesøndag&quot;, cHolidayType_Full)
&apos; &quot;Pfingstmontag&quot;
CalInsertBankholiday(lDate+50, &quot;2. pinsedag&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 6, 5), &quot;Grundlovsdag&quot;, cHolidayType_Full)
&apos;Christmas Days
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;1. juledag&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;2. juledag&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Hellig 3 konger&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 3, 28), &quot;Dr. Ingrid&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 16), &quot;Dr. Margrete&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 16), &quot;Palmesøndag&quot;, cHolidayType_Half)
&apos; &quot;Befreiungstag&quot;
CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;Befrielsesdag&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 5, 26), &quot;Krpr. Frederik&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 7), &quot;Pr. Joachim&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 11), &quot;Pr. Henrik&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 15), &quot;Valdemarsdag&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 24), &quot;Skt. Hans&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 30), &quot;Prinsesse Alexandra&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 8, 28), &quot;Pr. Nikolai&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 24), &quot;FN-dag&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Morten Bisp&quot;, cHolidayType_Half)
&apos; all half (Memorial Days)
&apos;&quot;Adventsfeiertage
VierterAdvent = DateSerial(YearInt, 12, 24)
While (Weekday(VierterAdvent) &lt;&gt; 1)
vierterAdvent = vierterAdvent - 1
Wend
CalInsertBankholiday(vierterAdvent-21, &quot;1. søndag i advent&quot;, cHolidayType_Half)
CalInsertBankholiday(vierterAdvent-14, &quot;2. søndag i advent&quot;, cHolidayType_Half)
CalInsertBankholiday(vierterAdvent-7, &quot;3. søndag i advent&quot;, cHolidayType_Half)
CalInsertBankholiday(vierterAdvent, &quot;4. søndag i advent&quot;, cHolidayType_Half)
&apos;Christmas eve
CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Juleaften&quot;, cHolidayType_Half)
&apos;&quot;Sylvester&quot;
CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Nytårsaften&quot;, cHolidayType_Half)
End Sub
Sub FindWholeYearHolidays_ITA(ByVal YearInt as Integer)
Dim lDate&amp;
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Capodanno&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Epifania&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 4, 25), &quot;Festa della liberazione&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Ferragusto&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Tutti i Santi&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;Immacolata concezione&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Natale&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Santo Stefano&quot;, cHolidayType_Full)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate, &quot;Pasqua&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate+1, &quot;Lunedì dell&apos;Angelo&quot;, cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_SPAIN(ByVal YearInt as Integer)
Dim lDate&amp;
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Año Nuevo&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Reyes&quot;, cHolidayType_Full)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate-2, &quot;Viernes Santo&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate+1, &quot;Lunes de Pascua Florida&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate+39, &quot;Día de la Ascensión&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Fiesta del Trabajo&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Día de la Asunción&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 10, 12), &quot;Fiesta de la Hispanidad&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Todos los Santos&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 6), &quot;Día de la Constitución&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;La Inmaculada&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Navidad&quot;, cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_PORT(ByVal YearInt as Integer)
Dim lDate&amp;
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Ano Novo&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Reis Magos&quot;, cHolidayType_Half)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate-47, &quot;Carnaval&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate-7, &quot;Domingo de Ramos&quot;, cHolidayType_Half)
CalInsertBankholiday(lDate-2, &quot;Sexta-feira Santa&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate, &quot;Páscoa&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 4, 25), &quot;25 de Abril&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Dia do Trabalhador&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 29), &quot;Corpo de Deus&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 6, 10), &quot;Dia de Camões e das Comunidades Portuguesas&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 6, 24), &quot;S. João&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 6, 29), &quot;S. Pedro&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Assunção de Nossa Senhora&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 10, 5), &quot;Implantação da República&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Dia de Todos os Santos&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;Imaculada Conceição&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Natal&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 1), &quot;Restauração da Independência&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Passagem de Ano&quot;, cHolidayType_Half)
End Sub
Sub FindWholeYearHolidays_NL(ByVal YearInt as Integer)
Dim lDate&amp;
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nieuwjaarsdag&quot;, cHolidayType_Full)
lDate = CalEasterTable(YearInt)
CalInsertBankholiday(lDate, &quot;1e Paasdag&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate + 1, &quot;2e Paasdag&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate + 39, &quot;Hemelvaartsdag&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate + 49, &quot;1e Pinksterdag&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate + 50, &quot;2e Pinksterdag&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 4, 30), &quot;Koninginnedag&quot;, cHolidayType_Full)
&apos; Bevrijdingsdag is celebrated every 5th year
If YearInt Mod 5 = 0 then
CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;Bevrijdingsdag&quot;, cHolidayType_Full)
End if
CalInsertBankholiday(DateSerial(YearInt, 12, 6), &quot;Sinterklaas&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;1e Kerstdag&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;2e Kerstdag&quot;, cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_PL (ByVal YearInt as Integer)
Dim lDate&amp;, OsternDate&amp;
&apos; New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nowy Rok&quot;, cHolidayType_Full)
&apos; &quot;Hl. 3 Könige&quot;
CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Trzech Króli&quot;, cHolidayType_Half)
&apos; &quot;Frauentag&quot;
CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;Dzieñ Kobiet&quot;, cHolidayType_Half)
OsternDate = CalEasterTable(YearInt)
CalInsertBankholiday(OsternDate-2, &quot;Wielki Pi¹tek&quot;, cHolidayType_Full)
CalInsertBankholiday(OsternDate, &quot;Wielka Niedziela&quot;, cHolidayType_Full)
CalInsertBankholiday(OsternDate+1, &quot;Lany Poniedzia³ek&quot;, cHolidayType_Full)
&apos; Christi Himmelfahrt
CalInsertBankholiday(OsternDate+39, &quot;Wniebowst¹pienie&quot;, cHolidayType_Full)
&apos; Pfingsten
CalInsertBankholiday(OsternDate+49, &quot;Zielone Œwi¹tki&quot;, cHolidayType_Full)
&apos; Fronleichnam
CalInsertBankholiday(OsternDate+60, &quot;Bo¿e Cia³o&quot;, cHolidayType_Full)
&apos; First of May
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Œwiêto pracy&quot;, cHolidayType_Full)
&apos; Memorial day of constitution
CalInsertBankholiday(DateSerial(YearInt, 5, 3), &quot;Dzieñ konstytucji 3-go maja&quot;, cHolidayType_Full)
&apos; &quot;Kindertag&quot;
CalInsertBankholiday(DateSerial(YearInt, 6, 1), &quot;Dzieñ Dziecka&quot;, cHolidayType_Half)
&apos; &quot;Maria Himmelfahrt&quot;
CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Matki Boskiej Zielnej&quot;, cHolidayType_Half)
&apos; &quot;Allerheiligen&quot;
CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Wszystkich Œwiêtych&quot;, cHolidayType_Full)
&apos; National day&quot;
CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Dzieñ niepod³eg³oœci&quot;, cHolidayType_Full)
&apos; Christmas Eve
CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Wigilia&quot;, cHolidayType_Half)
&apos; Christmas
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Bo¿e Narodzenie&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Bo¿e Narodzenie&quot;, cHolidayType_Full)
&apos; &quot;Sylvester&quot;
CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Sylwester&quot;, cHolidayType_Half)
End Sub
Sub FindWholeYearHolidays_RU (ByVal YearInt as Integer)
Dim lDate&amp;
&apos; New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Íîâûé ãîä&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 1, 2), &quot;Íîâûé ãîä&quot;, cHolidayType_Full)
&apos; Russian Christmas&quot;
CalInsertBankholiday(DateSerial(YearInt, 1, 7), &quot;Ðîæäåñòâî&quot;, cHolidayType_Full)
&apos; Woman Day
CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;Ìåæäóíàðîäíûé æåíñêèé äåíü Ïðàçäíèê âåñíû è òðóäà &quot;, cHolidayType_Full)
&apos; Easter, get it with look-up table
lDate = CalEasterTable(YearInt) + 7
CalInsertBankholiday(lDate, &quot;Ïàñõà&quot;, cHolidayType_Full)
&apos; First of May
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Ïðàçäíèê âåñíû è òðóäà &quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 2), &quot;Ïðàçäíèê âåñíû è òðóäà&quot;, cHolidayType_Full)
&apos; Victory of the second World War
CalInsertBankholiday(DateSerial(YearInt, 5, 9), &quot;Äåíü Ïîáåäû&quot;, cHolidayType_Full)
&apos; End of Soviet Union
CalInsertBankholiday(DateSerial(YearInt, 6, 12), &quot;Äåíü íåçàâèñèìîñòè&quot;, cHolidayType_Full)
&apos; Peace Day
CalInsertBankholiday(DateSerial(YearInt, 11, 7), &quot;Äåíü ñîãëàñèÿ è ïðèìèðåíèÿÄåíü ñîãëàñèÿ è ïðèìèðåíèÿ&quot;, cHolidayType_Full)
&apos; Constitution Day
CalInsertBankholiday(DateSerial(YearInt, 12, 12), &quot;Äåíü êîíñòèòóöèè&quot;, 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), &quot;New Year&apos;s Day&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 2, 2), &quot;Groundhog Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 2, 14), &quot;Valentine&apos;s Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 3, 17), &quot;St Patrick&apos;s Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 1), &quot;April Fools&apos; Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 22), &quot;Earth Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 5, 6), &quot;Nurses&apos; Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 14), &quot;Flag Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 14), &quot;Army Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 6, 19), &quot;Juneteenth(Liberation of Slaves)&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 7, 4), &quot;Independence Day&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 8, 1), &quot;Air Force Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 8, 4), &quot;Coast Guard Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 9, 17), &quot;Citizenship Day or Constitution Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 16), &quot;Bosses&apos; Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 26 ), &quot;Mother-in-Law&apos;s Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 27), &quot;Navy Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 31), &quot;Halloween&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 11, 10), &quot;Marine Corps Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Veteran&apos;s Day&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 7), &quot;Pearl Harbor Remembrance Day&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Christmas Eve&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Christmas Day&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Kwanzaa&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 27), &quot;Kwanzaa&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 28), &quot;Kwanzaa&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 29), &quot;Kwanzaa&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 30), &quot;Kwanzaa&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Kwanzaa&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;New Year&apos;s Eve&quot;, cHolidayType_Half)
CalInsertBankholiday(CalEasterTable(YearInt), &quot;Easter Sunday&quot;, cHolidayType_Half)
&apos; Inauguration Day occurs every 4 years (1997, 2001) in the year following the presidential election
&apos; 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, &quot;Inauguration Day&quot;, cHolidayType_Half)
Else
CalInsertBankholiday(lDate, &quot;Inauguration Day&quot;, cHolidayType_Half)
End If
End If
&apos; 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 &gt; lFirstNov Then
CalInsertBankholiday(lElectDate, &quot;Election Day&quot;, cHolidayType_Half)
Else
CalInsertBankholiday(lElectDate + 7, &quot;Election Day&quot;, cHolidayType_Half)
End If
End If
CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 14), &quot;Martin Luther King Jr Day&quot;, cHolidayType_Full)
CalInsertBankholiday(GetMonthDate(YearInt, 2, 2, 14), &quot;President&apos;s Day&quot;, cHolidayType_Full)
&apos; Mothers Day : 2nd Sunday in May, Full
CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), &quot;Mother&apos;s Day&quot;, cHolidayType_Full)
&apos; Wednesday of the last full week of April Administrative Professionals&apos; Day (formerly Secretaries&apos; Day)
CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, -7)-3, &quot;Administrative Professionals&apos; Day&quot;, cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 5, 5, 0), &quot;National Day of Prayer&quot;, cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, 14), &quot;Armed Forces Day&quot;, cHolidayType_Half)
&apos; Fathers Day : 3rd Sunday in June
CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), &quot;Father&apos;s Day&quot;, cHolidayType_Half)
&apos; Last Monday in May: Menorial Day, Full
CalInsertBankholiday(GetMonthDate(YearInt, 6, 2, 0)-7, &quot;Memorial Day&quot;, cHolidayType_Full)
CalInsertBankholiday(GetMonthDate(YearInt, 7, 1, 21), &quot;Parents&apos; Day&quot;, cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 8, 1, 0), &quot;Friendship Day&quot;, cHolidayType_Half)
&apos; 1st Monday in Sep : Labor Day, Full
CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0), &quot;Labor Day&quot;, cHolidayType_Full)
&apos; Sunday after Labor Day Grandparents&apos; Day
CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0)+6, &quot;Grandparents&apos; Day&quot;, cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 10, 1, 0), &quot;National Children&apos;s Day&quot;, cHolidayType_Half)
CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), &quot;Columbus Day&quot;, cHolidayType_Full)
&apos; Sweetest Day: Third Saturday in October
CalInsertBankholiday(GetMonthDate(YearInt, 10, 7, 14), &quot;Sweetest Day&quot;, cHolidayType_Half)
&apos; 4th Thu in Nov : Thanksgiving, Full
CalInsertBankholiday(GetMonthDate(YearInt, 11, 5, 21), &quot;Thanksgiving&quot;, cHolidayType_Full)
End Sub
Sub FindWholeYearHolidays_JP(ByVal YearInt as Integer)
Dim lDate&amp;
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元日&quot;, cHolidayType_Full)
&apos; 2nd Monday in January
CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 7), &quot;成人の日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 2, 11), &quot;建国記念の日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 3, 20), &quot;春分の日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 4, 29), &quot;みどりの日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 3), &quot;憲法記念日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 4), &quot;国民の休日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;こどもの日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 9, 23), &quot;秋分の日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 10, 2), &quot;体育の日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 3), &quot;文化の日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 11, 23), &quot;勤労感謝の日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 12, 23), &quot;天皇誕生日&quot;, cHolidayType_Full)
If YearInt &gt; 2002 Then
CalInsertBankholiday(GetMonthDate(YearInt, 7, 2, 14), &quot;海の日&quot;, cHolidayType_Full)
CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 14), &quot;敬老の日&quot;, cHolidayType_Full)
Else
CalInsertBankholiday(DateSerial(YearInt, 7, 20), &quot;海の日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 9, 15), &quot;敬老の日&quot;, cHolidayType_Full)
End If
End Sub
Sub FindWholeYearHolidays_TW(YearInt as Integer)
CalculateChineseNewYear(YearInt)
CalInsertBankholiday(DateSerial(YearInt, 2, 28), &quot;和平紀念日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;婦女節&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 3, 29), &quot;革命先烈紀念日(青年節)&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 4), &quot;兒童節&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 4, 5), &quot;民族掃墓節&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;勞動節&quot;, cHolidayType_Full)
CalInsertBankholiday(GetNextWeekDay(YearInt, 5, 19, 2), &quot;佛陀誕辰紀念日&quot;, cHolidayType_Full) &apos; Just like Columbus Day
CalInsertBankholiday(DateSerial(YearInt, 6, 15), &quot;端午節&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 9, 3), &quot;軍人節&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 9, 21), &quot;中秋節&quot;, cHolidayType_Full)
CalInsertBankholiday(GetNextWeekDay(YearInt, 9, 28, 2), &quot;孔子誕辰紀念日(教師節)&quot;, cHolidayType_Full) &apos; Just like Columnbusday
CalInsertBankholiday(DateSerial(YearInt, 10, 10), &quot;國慶日&quot;, cHolidayType_Full)
CalInsertBankholiday(DateSerial(YearInt, 10, 25), &quot;臺灣光復節&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 10, 31), &quot;先總統 蔣公誕辰紀念日&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 11), &quot;國父誕辰紀念日(中華文化復興節)&quot;, cHolidayType_Half)
CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;行憲紀念日&quot;, cHolidayType_Half)
End Sub
Function GetNextWeekDay(iYear as Integer, iMonth as Integer, iDay as Integer, iWeekDay as Integer)
Dim lDate as Long
Dim iCurWeekDay as Integer
lDate = DateSerial(iYear, iMonth, iDay)
iCurWeekDay = WeekDay(lDate)
While iCurWeekDay &lt;&gt; iWeekDay
lDate = lDate + 1
iCurWeekDay = WeekDay(lDate)
Wend
GetNextWeekDay() = lDate
End Function
Sub FindWholeYearHolidays_CN(YearInt as Integer)
CalculateChineseNewYear(YearInt)
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元旦&quot;, cHolidayType_Full) &apos; New Year
CalInsertBankholiday(DateSerial(YearInt, 5, 8), &quot;妇女节&quot;, cHolidayType_Half) &apos; Women&apos;s Day
CalInsertBankholiday(DateSerial(YearInt, 4, 5), &quot;清明节&quot;, cHolidayType_Half) &apos; Day of the deads
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;劳动节&quot;, cHolidayType_Full) &apos; International Labour Day
CalInsertBankholiday(DateSerial(YearInt, 6, 1), &quot;儿童节&quot;, cHolidayType_Half) &apos; Children&apos;s Day
CalInsertBankholiday(DateSerial(YearInt, 8, 1), &quot;建军节&quot;, cHolidayType_Half) &apos; Foundation of military
CalInsertBankholiday(DateSerial(YearInt, 10, 1), &quot;国庆节&quot;, cHolidayType_Full) &apos; National festival day
End Sub
&apos; Unfortunately I could not find a Routine to convert a &apos;Moon Date&apos; 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 sCurLangLocale
Case &quot;zh&quot;
CalInsertBankholiday(lDate-1, &quot;春节&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate, &quot;春节&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate+1, &quot;春节&quot;, cHolidayType_Full)
Case Else
CalInsertBankholiday(lDate-1, &quot;農曆除夕&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate, &quot;道教節&quot;, cHolidayType_Full)
CalInsertBankholiday(lDate+1, &quot;春節&quot;, cHolidayType_Full)
End Select
End Sub
&apos; Todo: Was passiert mit den Jahren vor 1980?
Function CalculateJapaneseSpringDay(iSelYear as Integer)
If (iSelYear &gt; 1979) And (iSelYear &lt; 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 &gt; 1979) And (iSelYear &lt; 2100) Then
CalculateJapaneseAutumnDay() = Int(23.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
End If
End Function</script:module>