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="HolidaySweden" script:language="StarBasic">Option Explicit
-
- Sub Main
- Call CalAutopilotTable()
- End Sub
-
-
-
- Sub FindWholeYearHolidays_SWED(ByVal YearInt%)
-
- Dim lDate&
-
- CalInsertBankholiday(DateSerial(YearInt%, 1, 1), "Nyårsdagen", cHolidayType_Full)
-
- CalInsertBankholiday(DateSerial(YearInt%, 1, 6), "Trettondagen", cHolidayType_Full)
-
- ' Easter, get it with look-up table
- 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
- </script:module>