home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2002 November
/
VPR0211A.ISO
/
OPENOFFICE
/
f_0030
/
LocalHolidays.xba
< prev
next >
Wrap
Extensible Markup Language
|
2002-02-19
|
30KB
|
503 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<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 + 10, "Pentecテエte", cHolidayType_Full)
CalInsertBankholiday(lEasterDate + 39, "Ascension", 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)
lDate = DateSerial(YearInt, 6, 20)
While (Weekday(lDate) <> 7) ' Saturday
lDate = lDate + 1
Wend
CalInsertBankholiday(lDate, "Midsommardagen", cHolidayType_Full)
lDate = DateSerial(YearInt, 10, 31)
While (Weekday(lDate) <> 7) ' Saturday
lDate = lDate + 1
Wend
CalInsertBankholiday(lDate, "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_DK (ByVal YearInt as Integer)
Dim lDate&, VierterAdvent&
'New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nytテ・rsdag", cHolidayType_Full)
lDate = CalEasterTable (YearInt)
'"Fasching"
CalInsertBankholiday(lDate-49, "Fastelavn", cHolidayType_Half)
'"Grテシndonnerstag"
CalInsertBankholiday(lDate-3, "Skテヲrtorsdag", cHolidayType_Full)
'"Karfreitag"
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)
' "Christi Himmelfahrt
CalInsertBankholiday(lDate+39, "Kristi himmelfahrt", cHolidayType_Full)
' "Pfingstsonntag"
CalInsertBankholiday(lDate+49, "Pinsesテクndag", cHolidayType_Full)
' "Pfingstmontag"
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)
' "Befreiungstag"
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)
'"Adventsfeiertage
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)
'"Sylvester"
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_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)
' "Hl. 3 Kテカnige"
CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trzech Krテウli", cHolidayType_Half)
' "Frauentag"
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)
' Christi Himmelfahrt
CalInsertBankholiday(OsternDate+39, "Wniebowstツケpienie", cHolidayType_Full)
' Pfingsten
CalInsertBankholiday(OsternDate+49, "Zielone ナ蜘iツケtki", cHolidayType_Full)
' Fronleichnam
CalInsertBankholiday(OsternDate+60, "Boツソe Ciaツウo", cHolidayType_Full)
' First of May
CalInsertBankholiday(DateSerial(YearInt, 5, 1), "ナ蜘iテェto pracy", cHolidayType_Full)
' Memorial day of constitution
CalInsertBankholiday(DateSerial(YearInt, 5, 3), "Dzieテア konstytucji 3-go maja", cHolidayType_Full)
' "Kindertag"
CalInsertBankholiday(DateSerial(YearInt, 6, 1), "Dzieテア Dziecka", cHolidayType_Half)
' "Maria Himmelfahrt"
CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Matki Boskiej Zielnej", cHolidayType_Half)
' "Allerheiligen"
CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Wszystkich ナ蜘iテェtych", cHolidayType_Full)
' National day"
CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Dzieテア niepodツウegツウoナ田i", 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)
' "Sylvester"
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)
' Woman Day
CalInsertBankholiday(DateSerial(YearInt, 3, 8), "テ古・テヲテ、テウテュテテーテョテ、テュテサテゥ テヲテ・テュテアテェティテゥ テ、テ・テュテシ テ湘ーテテァテ、テュティテェ テ「テ・テアテュテサ ティ テイテーテウテ、テ ", cHolidayType_Full)
' Easter, get it with look-up table
lDate = CalEasterTable(YearInt) + 7
CalInsertBankholiday(lDate, "テ湘テアテオテ", cHolidayType_Full)
' First of May
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)
' End of Soviet Union
CalInsertBankholiday(DateSerial(YearInt, 6, 12), "テテ・テュテシ テュテ・テァテテ「ティテアティテャテョテアテイティ", cHolidayType_Full)
' Peace Day
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(DateSerial(YearInt, 10, 2), "菴楢ご縺ョ譌・", 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
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 <> 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), "蜈率", 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>