home *** CD-ROM | disk | FTP | other *** search
- <?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="HolidayDanmark" script:language="StarBasic">REM ***** BASIC *****
- Option Explicit
-
- Sub Main
- Call CalAutopilotTable()
- End Sub
-
-
-
- Sub FindWholeYearHolidays_DK (ByVal YearInt%)
- Dim lDate&, VierterAdvent&
-
- 'New Year
- CalInsertBankholiday(DateSerial(YearInt%, 1, 1), "Nytårsdag", cHolidayType_Full)
- ' Easter, get it with look-up table
- 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
- </script:module>