home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 March / PCWorld_2003-03_cd.bin / Software / Vyzkuste / openoffice / f_0032 / LocalHolidays.xba < prev    next >
Extensible Markup Language  |  2002-02-19  |  29KB  |  503 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
  3. <script:module xmlns:script="http://openoffice.org/2000/script" script:name="LocalHolidays" script:language="StarBasic">Option Explicit
  4.  
  5. Sub Main
  6.     Call CalAutopilotTable()
  7. End Sub
  8.  
  9.  
  10. Sub FindWholeYearHolidays_FRANCE(ByVal YearInt as Integer)
  11. Dim lEasterDate&
  12. Dim lDate&
  13.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Jour de l'an", cHolidayType_Full)
  14.     lEasterDate = CalEasterTable(YearInt)
  15.     CalInsertBankholiday(lEasterDate, "P├óques", cHolidayType_Full)
  16.     CalInsertBankholiday(lEasterDate + 10, "Pentec├┤te", cHolidayType_Full)
  17.     CalInsertBankholiday(lEasterDate + 39, "Ascension", cHolidayType_Full)
  18.     CalInsertBankholiday(DateSerial(YearInt, 5, 1), "F├¬te du travail", cHolidayType_Full)
  19.     CalInsertBankholiday(DateSerial(YearInt, 5, 8), "Victoire 1945", cHolidayType_Full)
  20.     CalInsertBankholiday(DateSerial(YearInt, 7, 14), "F├¬te Nationale", cHolidayType_Full)
  21.     CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Assomption", cHolidayType_Full)
  22.     CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Toussaint", cHolidayType_Full)
  23.     CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Armistice ou Victoire 1918", cHolidayType_Full)
  24.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "No├½l", cHolidayType_Full)
  25. End Sub
  26.  
  27.  
  28. Sub FindWholeYearHolidays_SWED(ByVal YearInt as Integer)
  29. Dim lDate&
  30.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Ny├Ñrsdagen", cHolidayType_Full)
  31.     CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trettondagen", cHolidayType_Full)
  32.     lDate = CalEasterTable(YearInt)
  33.     CalInsertBankholiday(lDate - 2, "L├Ñngfredagen", cHolidayType_Full)
  34.     CalInsertBankholiday(lDate, "P├Ñskdagen", cHolidayType_Full)
  35.     CalInsertBankholiday(lDate + 1, "Annandag p├Ñsk", cHolidayType_Full)
  36.     CalInsertBankholiday(lDate + 39, "Kristi himmelf├ñrds dag", cHolidayType_Full)
  37.     CalInsertBankholiday(lDate + 49, "Pingstdagen", cHolidayType_Full)
  38.     CalInsertBankholiday(lDate + 50, "Annandag pingst", cHolidayType_Full)
  39.     CalInsertBankholiday(DateSerial(YearInt, 5, 1), "1:a maj", cHolidayType_Full)
  40.     lDate = DateSerial(YearInt, 6, 20)
  41.     While (Weekday(lDate) <> 7)    ' Saturday
  42.         lDate = lDate + 1
  43.     Wend
  44.     CalInsertBankholiday(lDate, "Midsommardagen", cHolidayType_Full)
  45.     lDate = DateSerial(YearInt, 10, 31)
  46.     While (Weekday(lDate) <> 7)    ' Saturday
  47.         lDate = lDate + 1
  48.     Wend
  49.     CalInsertBankholiday(lDate, "Alla helgons dag", cHolidayType_Full)
  50.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Juldagen", cHolidayType_Full)
  51.     CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Annandag jul", cHolidayType_Full)
  52. End Sub
  53.  
  54.  
  55. Sub FindWholeYearHolidays_DK (ByVal YearInt as Integer)
  56. Dim lDate&, VierterAdvent&
  57.  
  58.     'New Year
  59.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nyt├Ñrsdag", cHolidayType_Full)
  60.     lDate = CalEasterTable (YearInt)
  61.     '"Fasching"
  62.     CalInsertBankholiday(lDate-49, "Fastelavn", cHolidayType_Half)
  63.     '"Gr├╝ndonnerstag"
  64.     CalInsertBankholiday(lDate-3, "Sk├ªrtorsdag", cHolidayType_Full)
  65.     '"Karfreitag"
  66.     CalInsertBankholiday(lDate-2, "Langfredag", cHolidayType_Full)
  67.     ' Easter Sunday
  68.     CalInsertBankholiday(lDate, "P├Ñskes├╕ndag", cHolidayType_Full)
  69.     ' Easter Monday
  70.     CalInsertBankholiday(lDate+1, "2. p├Ñskedag", cHolidayType_Full)
  71.     ' 4th Friday after Easter
  72.     CalInsertBankholiday(lDate+26, "Store bededag", cHolidayType_Full)
  73.     ' "Christi Himmelfahrt
  74.     CalInsertBankholiday(lDate+39, "Kristi himmelfahrt", cHolidayType_Full)
  75.     ' "Pfingstsonntag"
  76.     CalInsertBankholiday(lDate+49, "Pinses├╕ndag", cHolidayType_Full)
  77.     ' "Pfingstmontag"
  78.     CalInsertBankholiday(lDate+50, "2. pinsedag", cHolidayType_Full)
  79.     CalInsertBankholiday(DateSerial(YearInt, 6, 5), "Grundlovsdag", cHolidayType_Full)
  80.     'Christmas Days
  81.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "1. juledag", cHolidayType_Full)
  82.     CalInsertBankholiday(DateSerial(YearInt, 12, 26), "2. juledag", cHolidayType_Full)
  83.     CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Hellig 3 konger", cHolidayType_Half)
  84.     CalInsertBankholiday(DateSerial(YearInt, 3, 28), "Dr. Ingrid", cHolidayType_Half)
  85.     CalInsertBankholiday(DateSerial(YearInt, 4, 16), "Dr. Margrete", cHolidayType_Half)
  86.     CalInsertBankholiday(DateSerial(YearInt, 4, 16), "Palmes├╕ndag", cHolidayType_Half)
  87.     ' "Befreiungstag"
  88.     CalInsertBankholiday(DateSerial(YearInt, 5, 5), "Befrielsesdag", cHolidayType_Half)
  89.     CalInsertBankholiday(DateSerial(YearInt, 5, 26), "Krpr. Frederik", cHolidayType_Half)
  90.     CalInsertBankholiday(DateSerial(YearInt, 6, 7), "Pr. Joachim", cHolidayType_Half)
  91.     CalInsertBankholiday(DateSerial(YearInt, 6, 11), "Pr. Henrik", cHolidayType_Half)
  92.     CalInsertBankholiday(DateSerial(YearInt, 6, 15), "Valdemarsdag", cHolidayType_Half)
  93.     CalInsertBankholiday(DateSerial(YearInt, 6, 24), "Skt. Hans", cHolidayType_Half)
  94.     CalInsertBankholiday(DateSerial(YearInt, 6, 30), "Prinsesse Alexandra", cHolidayType_Half)
  95.     CalInsertBankholiday(DateSerial(YearInt, 8, 28), "Pr. Nikolai", cHolidayType_Half)
  96.     CalInsertBankholiday(DateSerial(YearInt, 10, 24), "FN-dag", cHolidayType_Half)
  97.     CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Morten Bisp", cHolidayType_Half)
  98.     ' all half (Memorial Days)
  99.     '"Adventsfeiertage
  100.     VierterAdvent = DateSerial(YearInt, 12, 24)
  101.     While (Weekday(VierterAdvent) <> 1)
  102.         vierterAdvent = vierterAdvent - 1
  103.     Wend
  104.     CalInsertBankholiday(vierterAdvent-21, "1. s├╕ndag i advent", cHolidayType_Half)
  105.     CalInsertBankholiday(vierterAdvent-14, "2. s├╕ndag i advent", cHolidayType_Half)
  106.     CalInsertBankholiday(vierterAdvent-7, "3. s├╕ndag i advent", cHolidayType_Half)
  107.     CalInsertBankholiday(vierterAdvent, "4. s├╕ndag i advent", cHolidayType_Half)
  108.     'Christmas eve
  109.     CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Juleaften", cHolidayType_Half)
  110.     '"Sylvester"
  111.     CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Nyt├Ñrsaften", cHolidayType_Half)
  112. End Sub
  113.  
  114.  
  115. Sub FindWholeYearHolidays_ITA(ByVal YearInt as Integer)
  116. Dim lDate&
  117.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Capodanno", cHolidayType_Full)
  118.     CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Epifania", cHolidayType_Full)
  119.     CalInsertBankholiday(DateSerial(YearInt, 4, 25), "Festa della liberazione", cHolidayType_Full)
  120.     CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Ferragusto", cHolidayType_Full)
  121.     CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Tutti i Santi", cHolidayType_Full)
  122.     CalInsertBankholiday(DateSerial(YearInt, 12, 8), "Immacolata concezione", cHolidayType_Full)
  123.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Natale", cHolidayType_Full)
  124.     CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Santo Stefano", cHolidayType_Full)
  125.     lDate = CalEasterTable(YearInt)
  126.     CalInsertBankholiday(lDate, "Pasqua", cHolidayType_Full)
  127.     CalInsertBankholiday(lDate+1, "Luned├¼ dell'Angelo", cHolidayType_Full)
  128. End Sub
  129.  
  130.  
  131. Sub FindWholeYearHolidays_SPAIN(ByVal YearInt as Integer)
  132. Dim lDate&
  133.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "A├▒o Nuevo", cHolidayType_Full)
  134.     CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Reyes", cHolidayType_Full)
  135.     lDate = CalEasterTable(YearInt)
  136.     CalInsertBankholiday(lDate-2, "Viernes Santo", cHolidayType_Full)
  137.     CalInsertBankholiday(lDate+1, "Lunes de Pascua Florida", cHolidayType_Full)
  138.     CalInsertBankholiday(lDate+39, "D├¡a de la Ascensi├│n", cHolidayType_Full)
  139.     CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Fiesta del Trabajo", cHolidayType_Full)
  140.     CalInsertBankholiday(DateSerial(YearInt, 8, 15), "D├¡a de la Asunci├│n", cHolidayType_Full)
  141.     CalInsertBankholiday(DateSerial(YearInt, 10, 12), "Fiesta de la Hispanidad", cHolidayType_Full)
  142.     CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Todos los Santos", cHolidayType_Full)
  143.     CalInsertBankholiday(DateSerial(YearInt, 12, 6), "D├¡a de la Constituci├│n", cHolidayType_Full)
  144.     CalInsertBankholiday(DateSerial(YearInt, 12, 8), "La Inmaculada", cHolidayType_Full)
  145.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Navidad", cHolidayType_Full)
  146. End Sub
  147.  
  148.  
  149. Sub FindWholeYearHolidays_PORT(ByVal YearInt as Integer)
  150. Dim lDate&
  151.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Ano Novo", cHolidayType_Full)
  152.     CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Reis Magos", cHolidayType_Half)
  153.     lDate = CalEasterTable(YearInt)
  154.     CalInsertBankholiday(lDate-47, "Carnaval", cHolidayType_Full)
  155.     CalInsertBankholiday(lDate-7, "Domingo de Ramos", cHolidayType_Half)
  156.     CalInsertBankholiday(lDate-2, "Sexta-feira Santa", cHolidayType_Full)
  157.     CalInsertBankholiday(lDate, "P├íscoa", cHolidayType_Full)
  158.     CalInsertBankholiday(DateSerial(YearInt, 4, 25), "25 de Abril", cHolidayType_Full)
  159.     CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Dia do Trabalhador", cHolidayType_Full)
  160.     CalInsertBankholiday(DateSerial(YearInt, 5, 29), "Corpo de Deus", cHolidayType_Full)
  161.     CalInsertBankholiday(DateSerial(YearInt, 6, 10), "Dia de Cam├╡es e das Comunidades Portuguesas", cHolidayType_Full)
  162.     CalInsertBankholiday(DateSerial(YearInt, 6, 24), "S. Jo├úo", cHolidayType_Full)
  163.     CalInsertBankholiday(DateSerial(YearInt, 6, 29), "S. Pedro", cHolidayType_Full)
  164.     CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Assun├º├úo de Nossa Senhora", cHolidayType_Full)
  165.     CalInsertBankholiday(DateSerial(YearInt, 10, 5), "Implanta├º├úo da Rep├║blica", cHolidayType_Full)
  166.     CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Dia de Todos os Santos", cHolidayType_Full)
  167.     CalInsertBankholiday(DateSerial(YearInt, 12, 8), "Imaculada Concei├º├úo", cHolidayType_Full)
  168.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Natal", cHolidayType_Full)
  169.     CalInsertBankholiday(DateSerial(YearInt, 12, 1), "Restaura├º├úo da Independ├¬ncia", cHolidayType_Full)
  170.     CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Passagem de Ano", cHolidayType_Half)
  171. End Sub
  172.  
  173.  
  174. Sub FindWholeYearHolidays_NL(ByVal YearInt as Integer)
  175. Dim lDate&
  176.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nieuwjaarsdag", cHolidayType_Full)
  177.     lDate = CalEasterTable(YearInt)
  178.     CalInsertBankholiday(lDate, "1e Paasdag", cHolidayType_Full)
  179.     CalInsertBankholiday(lDate + 1, "2e Paasdag", cHolidayType_Full)
  180.     CalInsertBankholiday(lDate + 39, "Hemelvaartsdag", cHolidayType_Full)
  181.     CalInsertBankholiday(lDate + 49, "1e Pinksterdag", cHolidayType_Full)
  182.     CalInsertBankholiday(lDate + 50, "2e Pinksterdag", cHolidayType_Full)
  183.     CalInsertBankholiday(DateSerial(YearInt, 4, 30), "Koninginnedag", cHolidayType_Full)
  184.     ' Bevrijdingsdag is celebrated every 5th year
  185.     If YearInt Mod 5 = 0 then
  186.         CalInsertBankholiday(DateSerial(YearInt, 5, 5), "Bevrijdingsdag", cHolidayType_Full)
  187.     End if
  188.     CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Sinterklaas", cHolidayType_Half)
  189.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "1e Kerstdag", cHolidayType_Full)
  190.     CalInsertBankholiday(DateSerial(YearInt, 12, 26), "2e Kerstdag", cHolidayType_Full)
  191. End Sub
  192.  
  193.  
  194. Sub FindWholeYearHolidays_PL (ByVal YearInt as Integer)
  195.     Dim lDate&, OsternDate&
  196.     ' New Year
  197.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nowy Rok", cHolidayType_Full)
  198.     ' "Hl. 3 K├╢nige"
  199.     CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trzech Kr├│li", cHolidayType_Half)
  200.     ' "Frauentag"
  201.     CalInsertBankholiday(DateSerial(YearInt, 3, 8), "Dzie├▒ Kobiet", cHolidayType_Half)
  202.     OsternDate = CalEasterTable(YearInt)
  203.     CalInsertBankholiday(OsternDate-2, "Wielki Pi┬╣tek", cHolidayType_Full)
  204.     CalInsertBankholiday(OsternDate, "Wielka Niedziela", cHolidayType_Full)
  205.     CalInsertBankholiday(OsternDate+1, "Lany Poniedzia┬│ek", cHolidayType_Full)
  206.     ' Christi Himmelfahrt
  207.     CalInsertBankholiday(OsternDate+39, "Wniebowst┬╣pienie", cHolidayType_Full)
  208.     ' Pfingsten
  209.     CalInsertBankholiday(OsternDate+49, "Zielone ┼Æwi┬╣tki", cHolidayType_Full)
  210.     ' Fronleichnam
  211.     CalInsertBankholiday(OsternDate+60, "Bo┬┐e Cia┬│o", cHolidayType_Full)
  212.     ' First of May
  213.     CalInsertBankholiday(DateSerial(YearInt, 5, 1), "┼Æwi├¬to pracy", cHolidayType_Full)
  214.     ' Memorial day of constitution
  215.     CalInsertBankholiday(DateSerial(YearInt, 5, 3), "Dzie├▒ konstytucji 3-go maja", cHolidayType_Full)
  216.     ' "Kindertag"
  217.     CalInsertBankholiday(DateSerial(YearInt, 6, 1), "Dzie├▒ Dziecka", cHolidayType_Half)
  218.     ' "Maria Himmelfahrt"
  219.     CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Matki Boskiej Zielnej", cHolidayType_Half)
  220.     ' "Allerheiligen"
  221.     CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Wszystkich ┼Æwi├¬tych", cHolidayType_Full)
  222.     ' National day"
  223.     CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Dzie├▒ niepod┬│eg┬│o┼ôci", cHolidayType_Full)
  224.     ' Christmas Eve
  225.     CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Wigilia", cHolidayType_Half)
  226.     ' Christmas
  227.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Bo┬┐e Narodzenie", cHolidayType_Full)
  228.     CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Bo┬┐e Narodzenie", cHolidayType_Full)
  229.     ' "Sylvester"
  230.     CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Sylwester", cHolidayType_Half)
  231. End Sub
  232.  
  233.  
  234. Sub FindWholeYearHolidays_RU (ByVal YearInt as Integer)
  235. Dim lDate&
  236.     ' New Year
  237.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "├ì├«├ó├╗├⌐ ├ú├«├ñ", cHolidayType_Full)
  238.     CalInsertBankholiday(DateSerial(YearInt, 1, 2), "├ì├«├ó├╗├⌐ ├ú├«├ñ", cHolidayType_Full)
  239.     ' Russian Christmas"
  240.     CalInsertBankholiday(DateSerial(YearInt, 1, 7), "├É├«├ª├ñ├Ñ├▒├▓├ó├«", cHolidayType_Full)
  241.     ' Woman Day
  242.     CalInsertBankholiday(DateSerial(YearInt, 3, 8), "├î├Ñ├ª├ñ├│├¡├á├░├«├ñ├¡├╗├⌐ ├ª├Ñ├¡├▒├¬├¿├⌐ ├ñ├Ñ├¡├╝ ├Å├░├á├º├ñ├¡├¿├¬ ├ó├Ñ├▒├¡├╗ ├¿ ├▓├░├│├ñ├á ", cHolidayType_Full)
  243.     '    Easter, get it with look-up table
  244.     lDate = CalEasterTable(YearInt) + 7
  245.     CalInsertBankholiday(lDate, "├Å├á├▒├╡├á", cHolidayType_Full)
  246.     ' First of May
  247.     CalInsertBankholiday(DateSerial(YearInt, 5, 1), "├Å├░├á├º├ñ├¡├¿├¬ ├ó├Ñ├▒├¡├╗ ├¿ ├▓├░├│├ñ├á ", cHolidayType_Full)
  248.     CalInsertBankholiday(DateSerial(YearInt, 5, 2), "├Å├░├á├º├ñ├¡├¿├¬ ├ó├Ñ├▒├¡├╗ ├¿ ├▓├░├│├ñ├á", cHolidayType_Full)
  249.     ' Victory of the second World War
  250.     CalInsertBankholiday(DateSerial(YearInt, 5, 9), "├ä├Ñ├¡├╝ ├Å├«├í├Ñ├ñ├╗", cHolidayType_Full)
  251.     ' End of Soviet Union
  252.     CalInsertBankholiday(DateSerial(YearInt, 6, 12), "├ä├Ñ├¡├╝ ├¡├Ñ├º├á├ó├¿├▒├¿├¼├«├▒├▓├¿", cHolidayType_Full)
  253.     ' Peace Day
  254.     CalInsertBankholiday(DateSerial(YearInt, 11, 7), "├ä├Ñ├¡├╝ ├▒├«├ú├½├á├▒├¿├┐ ├¿ ├»├░├¿├¼├¿├░├Ñ├¡├¿├┐├ä├Ñ├¡├╝ ├▒├«├ú├½├á├▒├¿├┐ ├¿ ├»├░├¿├¼├¿├░├Ñ├¡├¿├┐", cHolidayType_Full)
  255.     ' Constitution Day
  256.     CalInsertBankholiday(DateSerial(YearInt, 12, 12), "├ä├Ñ├¡├╝ ├¬├«├¡├▒├▓├¿├▓├│├╢├¿├¿", cHolidayType_Full)
  257. End Sub
  258.  
  259.  
  260. Sub FindWholeYearHolidays_US(ByVal YearInt as Integer)
  261. Dim lDate as Long
  262. Dim lFirstNov as Long
  263. Dim lElectDate as Long
  264.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "New Year's Day", cHolidayType_Full)
  265.     CalInsertBankholiday(DateSerial(YearInt, 2, 2), "Groundhog Day", cHolidayType_Half)
  266.     CalInsertBankholiday(DateSerial(YearInt, 2, 14), "Valentine's Day", cHolidayType_Half)
  267.     CalInsertBankholiday(DateSerial(YearInt, 3, 17), "St Patrick's Day", cHolidayType_Half)
  268.     CalInsertBankholiday(DateSerial(YearInt, 4, 1), "April Fools' Day", cHolidayType_Half)
  269.     CalInsertBankholiday(DateSerial(YearInt, 4, 22), "Earth Day", cHolidayType_Half)
  270.     CalInsertBankholiday(DateSerial(YearInt, 5, 6), "Nurses' Day", cHolidayType_Half)
  271.     CalInsertBankholiday(DateSerial(YearInt, 6, 14), "Flag Day", cHolidayType_Half)
  272.     CalInsertBankholiday(DateSerial(YearInt, 6, 14), "Army Day", cHolidayType_Half)
  273.     CalInsertBankholiday(DateSerial(YearInt, 6, 19), "Juneteenth(Liberation of Slaves)", cHolidayType_Half)
  274.  
  275.     CalInsertBankholiday(DateSerial(YearInt, 7, 4), "Independence Day", cHolidayType_Full)
  276.     CalInsertBankholiday(DateSerial(YearInt, 8, 1), "Air Force Day", cHolidayType_Half)
  277.     CalInsertBankholiday(DateSerial(YearInt, 8, 4), "Coast Guard Day", cHolidayType_Half)
  278.     CalInsertBankholiday(DateSerial(YearInt, 9, 17), "Citizenship Day or Constitution Day", cHolidayType_Half)
  279.     CalInsertBankholiday(DateSerial(YearInt, 10, 16), "Bosses' Day", cHolidayType_Half)
  280.     CalInsertBankholiday(DateSerial(YearInt, 10, 26 ), "Mother-in-Law's Day", cHolidayType_Half)
  281.     CalInsertBankholiday(DateSerial(YearInt, 10, 27), "Navy Day", cHolidayType_Half)
  282.     CalInsertBankholiday(DateSerial(YearInt, 10, 31), "Halloween", cHolidayType_Half)
  283.     CalInsertBankholiday(DateSerial(YearInt, 11, 10), "Marine Corps Day", cHolidayType_Half)
  284.     CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Veteran's Day", cHolidayType_Full)
  285.     CalInsertBankholiday(DateSerial(YearInt, 12, 7), "Pearl Harbor Remembrance Day", cHolidayType_Half)
  286.     CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Christmas Eve", cHolidayType_Half)
  287.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Christmas Day", cHolidayType_Full)
  288.     CalInsertBankholiday(DateSerial(YearInt, 12, 31), "New Year's Eve", cHolidayType_Half)
  289.  
  290.     CalInsertBankholiday(CalEasterTable(YearInt), "Easter Sunday", cHolidayType_Half)
  291.  
  292.     ' Inauguration Day occurs every 4 years (1997, 2001) in the year following the presidential election
  293.     ' always on the 20th of January unless this is a Sunday in which case on Monday 21st January
  294.     If YearInt Mod 4 = 1 Then
  295.         lDate = DateSerial(YearInt, 1, 20)
  296.         If WeekDay(lDate) = 1 Then
  297.             CalInsertBankholiday(lDate + 1, "Inauguration Day", cHolidayType_Half)
  298.         Else
  299.             CalInsertBankholiday(lDate, "Inauguration Day", cHolidayType_Half)
  300.         End If
  301.     End If
  302.     ' First Tuesday in November, but only after the 1st of November and only on evenly numbered years
  303.     If YearInt Mod 2 = 0 Then
  304.         lFirstNov = DateSerial(YearInt, 11, 1)
  305.         lElectDate = GetMonthDate(YearInt, 11, 3, 0)
  306.         If lElectDate > lFirstNov Then
  307.             CalInsertBankholiday(lElectDate, "Election Day", cHolidayType_Half)
  308.         Else
  309.             CalInsertBankholiday(lElectDate + 7, "Election Day", cHolidayType_Half)
  310.         End If
  311.     End If
  312.     CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 14), "Martin Luther King Jr Day", cHolidayType_Full)
  313.     CalInsertBankholiday(GetMonthDate(YearInt, 2, 2, 14), "President's Day", cHolidayType_Full)
  314.     '    Mothers Day : 2nd Sunday in May, Full
  315.     CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Mother's Day", cHolidayType_Full)
  316.  
  317.     ' Wednesday of the last full week of April Administrative Professionals' Day (formerly Secretaries' Day)
  318.     CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, -7)-3, "Administrative Professionals' Day", cHolidayType_Half)
  319.  
  320.     CalInsertBankholiday(GetMonthDate(YearInt, 5, 5, 0), "National Day of Prayer", cHolidayType_Half)
  321.     CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, 14), "Armed Forces Day", cHolidayType_Half)
  322.     '    Fathers Day : 3rd Sunday in June
  323.     CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), "Father's Day", cHolidayType_Half)
  324.  
  325.     '    Last Monday in May: Menorial Day, Full
  326.     CalInsertBankholiday(GetMonthDate(YearInt, 6, 2, 0)-7, "Memorial Day", cHolidayType_Full)
  327.     CalInsertBankholiday(GetMonthDate(YearInt, 7, 1, 21), "Parents' Day", cHolidayType_Half)
  328.     CalInsertBankholiday(GetMonthDate(YearInt, 8, 1, 0), "Friendship Day", cHolidayType_Half)
  329.  
  330.     '    1st Monday in Sep : Labor Day, Full
  331.     CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0), "Labor Day", cHolidayType_Full)
  332.     ' Sunday after Labor Day Grandparents' Day
  333.     CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0)+6, "Grandparents' Day", cHolidayType_Half)
  334.  
  335.     CalInsertBankholiday(GetMonthDate(YearInt, 10, 1, 0), "National Children's Day", cHolidayType_Half)
  336.     CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), "Columbus Day", cHolidayType_Full)
  337.     ' Sweetest Day: Third Saturday in October
  338.     CalInsertBankholiday(GetMonthDate(YearInt, 10, 7, 14), "Sweetest Day", cHolidayType_Half)
  339.     '    4th Thu    in Nov : Thanksgiving, Full
  340.     CalInsertBankholiday(GetMonthDate(YearInt, 11, 5, 21), "Thanksgiving", cHolidayType_Full)
  341. End Sub
  342.  
  343.  
  344. Sub FindWholeYearHolidays_JP(ByVal YearInt as Integer)
  345. Dim lDate&
  346.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "σàâµùÑ", cHolidayType_Full)
  347.     ' 2nd Monday in January
  348.     CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 7), "µêÉΣ║║πü«µùÑ", cHolidayType_Full)
  349.     CalInsertBankholiday(DateSerial(YearInt, 2, 11), "σ╗║σ¢╜Φ¿ÿσ┐╡πü«µùÑ", cHolidayType_Full)
  350.     CalInsertBankholiday(DateSerial(YearInt, 3, 20), "µÿÑσêåπü«µùÑ", cHolidayType_Full)
  351.     CalInsertBankholiday(DateSerial(YearInt, 4, 29), "πü┐πü⌐πéèπü«µùÑ", cHolidayType_Full)
  352.     CalInsertBankholiday(DateSerial(YearInt, 5, 3), "µå▓µ│òΦ¿ÿσ┐╡µùÑ", cHolidayType_Full)
  353.     CalInsertBankholiday(DateSerial(YearInt, 5, 4), "σ¢╜µ░æπü«Σ╝æµùÑ", cHolidayType_Full)
  354.     CalInsertBankholiday(DateSerial(YearInt, 5, 5), "πüôπü⌐πééπü«µùÑ", cHolidayType_Full)
  355.     CalInsertBankholiday(DateSerial(YearInt, 9, 23), "τºïσêåπü«µùÑ", cHolidayType_Full)
  356.     CalInsertBankholiday(DateSerial(YearInt, 10, 2), "Σ╜ôΦé▓πü«µùÑ", cHolidayType_Full)
  357.     CalInsertBankholiday(DateSerial(YearInt, 11, 3), "µûçσîûπü«µùÑ", cHolidayType_Full)
  358.     CalInsertBankholiday(DateSerial(YearInt, 11, 23), "σïñσè┤µäƒΦ¼¥πü«µùÑ", cHolidayType_Full)
  359.     CalInsertBankholiday(DateSerial(YearInt, 12, 23), "σñ⌐τÜçΦ¬òτöƒµùÑ", cHolidayType_Full)
  360.     If YearInt > 2002 Then
  361.         CalInsertBankholiday(GetMonthDate(YearInt, 7, 2, 14), "µ╡╖πü«µùÑ", cHolidayType_Full)
  362.         CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 14), "µò¼ΦÇüπü«µùÑ", cHolidayType_Full)
  363.     Else
  364.         CalInsertBankholiday(DateSerial(YearInt, 7, 20), "µ╡╖πü«µùÑ", cHolidayType_Full)
  365.         CalInsertBankholiday(DateSerial(YearInt, 9, 15), "µò¼ΦÇüπü«µùÑ", cHolidayType_Full)
  366.     End If
  367. End Sub
  368.  
  369.  
  370. Sub FindWholeYearHolidays_TW(YearInt as Integer)
  371.     CalculateChineseNewYear(YearInt)
  372.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "σàâµùª", cHolidayType_Full)
  373.     CalInsertBankholiday(DateSerial(YearInt, 2, 28), "σÆîσ╣│τ┤Çσ┐╡µùÑ", cHolidayType_Full)
  374.     CalInsertBankholiday(DateSerial(YearInt, 3, 8), "σ⌐ªσÑ│τ»Ç", cHolidayType_Half)
  375.     CalInsertBankholiday(DateSerial(YearInt, 3, 29), "Θ¥⌐σæ╜σàêτâêτ┤Çσ┐╡µùÑ∩╝êΘ¥Æσ╣┤τ»Ç∩╝ë", cHolidayType_Half)
  376.     CalInsertBankholiday(DateSerial(YearInt, 4, 4), "σàÆτ½Ñτ»Ç", cHolidayType_Half)
  377.     CalInsertBankholiday(DateSerial(YearInt, 4, 5), "µ░æµùŵÄâσóôτ»Ç", cHolidayType_Full)
  378.     CalInsertBankholiday(DateSerial(YearInt, 5, 1), "σï₧σïòτ»Ç", cHolidayType_Full)
  379.     CalInsertBankholiday(GetNextWeekDay(YearInt, 5, 19, 2), "Σ╜¢ΘÖÇΦ¬òΦ╛░τ┤Çσ┐╡µùÑ", cHolidayType_Full) ' Just like Columbus Day
  380.     CalInsertBankholiday(DateSerial(YearInt, 6, 15), "τ½»σìêτ»Ç", cHolidayType_Full)
  381.     CalInsertBankholiday(DateSerial(YearInt, 9, 3), "Φ╗ìΣ║║τ»Ç", cHolidayType_Half)
  382.     CalInsertBankholiday(DateSerial(YearInt, 9, 21), "Σ╕¡τºïτ»Ç", cHolidayType_Full)
  383.     CalInsertBankholiday(GetNextWeekDay(YearInt, 9, 28, 2), "σ¡öσ¡ÉΦ¬òΦ╛░τ┤Çσ┐╡µùÑ∩╝êµòÖσ╕½τ»Ç∩╝ë", cHolidayType_Full) ' Just like Columnbusday
  384.     CalInsertBankholiday(DateSerial(YearInt, 10, 10), "σ£ïµà╢µùÑ", cHolidayType_Full)
  385.     CalInsertBankholiday(DateSerial(YearInt, 10, 25), "Φç║τüúσàëσ╛⌐τ»Ç", cHolidayType_Half)
  386.     CalInsertBankholiday(DateSerial(YearInt, 10, 31), "σàêτ╕╜τ╡▒  Φöúσà¼Φ¬òΦ╛░τ┤Çσ┐╡µùÑ", cHolidayType_Half)
  387.     CalInsertBankholiday(DateSerial(YearInt, 12, 11), "σ£ïτê╢Φ¬òΦ╛░τ┤Çσ┐╡µùÑ∩╝êΣ╕¡ΦÅ»µûçσîûσ╛⌐Φêêτ»Ç∩╝ë", cHolidayType_Half)
  388.     CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Φíîµå▓τ┤Çσ┐╡µùÑ", cHolidayType_Half)
  389. End Sub
  390.  
  391.  
  392. Function GetNextWeekDay(iYear as Integer, iMonth as Integer, iDay as Integer, iWeekDay as Integer)
  393. Dim lDate as Long
  394. Dim iCurWeekDay as Integer
  395.     lDate = DateSerial(iYear, iMonth, iDay)
  396.     iCurWeekDay = WeekDay(lDate)
  397.     While iCurWeekDay <> iWeekDay
  398.         lDate = lDate + 1
  399.         iCurWeekDay = WeekDay(lDate)
  400.     Wend
  401.     GetNextWeekDay() = lDate
  402. End Function
  403.  
  404.  
  405. Sub FindWholeYearHolidays_CN(YearInt as Integer)
  406.     CalculateChineseNewYear(YearInt)
  407.     CalInsertBankholiday(DateSerial(YearInt, 1, 1), "σàâµùª", cHolidayType_Full)            ' New Year
  408.     CalInsertBankholiday(DateSerial(YearInt, 3, 8), "σªçσÑ│Φèé", cHolidayType_Half)                       ' Women's Day
  409.     CalInsertBankholiday(DateSerial(YearInt, 4, 5), "µ╕àµÿÄΦèé", cHolidayType_Half)            ' Day of the deads
  410.     CalInsertBankholiday(DateSerial(YearInt, 5, 1), "σè│σè¿Φèé", cHolidayType_Full)            ' International Labour Day
  411.     CalInsertBankholiday(DateSerial(YearInt, 6, 1), "σä┐τ½ÑΦèé", cHolidayType_Half)            ' Children's Day
  412.     CalInsertBankholiday(DateSerial(YearInt, 8, 1), "σ╗║σå¢Φèé", cHolidayType_Half)            ' Foundation of military
  413.     CalInsertBankholiday(DateSerial(YearInt, 10, 1), "σ¢╜σ║åΦèé", cHolidayType_Full)            ' National festival day
  414. End Sub
  415.  
  416.  
  417. ' Unfortunately I could not find a Routine to convert a 'Moon Date' into a gregorian date
  418. Sub CalculateChineseNewYear(iSelYear as Integer)
  419. Dim lDate as Long
  420.     Select Case iSelYear
  421.         Case 1995
  422.             lDate = DateSerial(iSelYear, 1, 31)
  423.         Case 1996
  424.             lDate = DateSerial(iSelYear, 2, 19)
  425.         Case 1997
  426.             lDate = DateSerial(iSelYear, 2, 7)
  427.         Case 1998
  428.             lDate = DateSerial(iSelYear, 1, 28)
  429.         Case 1999
  430.             lDate = DateSerial(iSelYear,2, 16)
  431.         Case 2000
  432.             lDate = DateSerial(iSelYear,2, 5)
  433.         Case 2001
  434.             lDate = DateSerial(iSelYear, 1, 24)
  435.         Case 2002
  436.             lDate = DateSerial(iSelYear,2, 12)
  437.         Case 2003
  438.             lDate = DateSerial(iSelYear,2, 1)
  439.         Case 2004
  440.             lDate = DateSerial(iSelYear, 1, 22)
  441.         Case 2005
  442.             lDate = DateSerial(iSelYear,2, 9)
  443.         Case 2006
  444.             lDate = DateSerial(iSelYear, 1, 29)
  445.         Case 2007
  446.             lDate = DateSerial(iSelYear,2, 18)
  447.         Case 2008
  448.             lDate = DateSerial(iSelYear,2, 7)
  449.         Case 2009
  450.             lDate = DateSerial(iSelYear, 1, 26)
  451.         Case 2010
  452.             lDate = DateSerial(iSelYear,2, 10)
  453.         Case 2011
  454.             lDate = DateSerial(iSelYear,2, 3)
  455.         Case 2012
  456.             lDate = DateSerial(iSelYear, 1, 23)
  457.         Case 2013
  458.             lDate = DateSerial(iSelYear,2, 10)
  459.         Case 2014
  460.             lDate = DateSerial(iSelYear, 1, 31)
  461.         Case 2015
  462.             lDate = DateSerial(iSelYear,2, 19)
  463.         Case 2016
  464.             lDate = DateSerial(iSelYear,2, 9)
  465.         Case 2017
  466.             lDate = DateSerial(iSelYear, 1, 28)
  467.         Case 2018
  468.             lDate = DateSerial(iSelYear,2, 16)
  469.         Case 2019
  470.             lDate = DateSerial(iSelYear,2, 5)
  471.         Case 2020
  472.             lDate = DateSerial(iSelYear, 1, 25)
  473.         Case Else
  474.             Exit Sub
  475.     End Select
  476.     Select Case  sCurCountryLocale
  477.         Case "CN"
  478.             CalInsertBankholiday(lDate-1, "σå£σÄåΘÖñσñò", cHolidayType_Full)
  479.             CalInsertBankholiday(lDate, "µÿÑΦèéσê¥Σ╕Ç", cHolidayType_Full)
  480.             CalInsertBankholiday(lDate+1, "µÿÑΦèéσê¥Σ║î", cHolidayType_Full)
  481.             CalInsertBankholiday(lDate+2, "µÿÑΦèéσê¥Σ╕ë", cHolidayType_Full)
  482.  
  483.         Case Else
  484.             CalInsertBankholiday(lDate-1, "Φ╛▓µ¢åΘÖñσñò", cHolidayType_Full)
  485.             CalInsertBankholiday(lDate, "µÿÑτ»Çσê¥Σ╕Ç", cHolidayType_Full)
  486.             CalInsertBankholiday(lDate+1, "µÿÑτ»Çσê¥Σ║î", cHolidayType_Full)
  487.             CalInsertBankholiday(lDate+2, "µÿÑτ»Çσê¥Σ╕ë", cHolidayType_Full)
  488.     End Select
  489. End Sub
  490.  
  491.  
  492. Function CalculateJapaneseSpringDay(iSelYear as Integer)
  493.     If (iSelYear > 1979) And (iSelYear < 2100) Then
  494.         CalculateJapaneseSpringDay() = Int(20.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
  495.     End If
  496. End Function
  497.  
  498.  
  499. Function CalculateJapaneseAutumnDay(iSelYear as Integer)
  500.     If (iSelYear > 1979) And (iSelYear < 2100) Then
  501.         CalculateJapaneseAutumnDay() = Int(23.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
  502.     End If
  503. End Function</script:module>