132 lines
No EOL
5.6 KiB
XML
132 lines
No EOL
5.6 KiB
XML
<?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="GermanHolidays" script:language="StarBasic">Option Explicit
|
|
|
|
Sub Main()
|
|
Call CalAutopilotTable()
|
|
End Sub
|
|
|
|
Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Integer
|
|
CalChoosenLand = 0
|
|
If (X>73)And(X<130)And(Y>=117)And(Y<181) Then
|
|
CalChoosenLand = CalBLBayern
|
|
|
|
ElseIf (X>41)And(X<89)And(Y>=136)And(Y<183) Then
|
|
CalChoosenLand = CalBLBadenWuert
|
|
|
|
ElseIf (X>18)And(X<35)And(Y>136)And(Y<147) Then
|
|
CalChoosenLand = CalBLSaarland
|
|
|
|
ElseIf (X>13)And(X<42)And(Y>111)And(Y<146) Then
|
|
CalChoosenLand = CalBLRheinlandPfalz
|
|
|
|
ElseIf (X>15)And(X<=60)And(Y>=69)And(Y<112) Then
|
|
CalChoosenLand = CalBLNordrheinWest
|
|
|
|
ElseIf (X>=42)And(X<78)And(Y>=95)And(Y<136) Then
|
|
CalChoosenLand = CalBLHessen
|
|
|
|
ElseIf (X>=78)And(X<112)And(Y>=95)And(Y<117) Then
|
|
CalChoosenLand = CalBLThueringen
|
|
|
|
ElseIf (X>=112)And(X<158)And(Y>=88)And(Y<114) Then
|
|
CalChoosenLand = CalBLSachsen
|
|
|
|
ElseIf (X>77)And(X<84)And(Y>35)And(Y<42) Then
|
|
CalChoosenLand = CalBLHamburg
|
|
|
|
ElseIf (X>56)And(X<60)And(Y>36)And(Y<41) Then
|
|
CalChoosenLand = CalBLBremen
|
|
|
|
ElseIf (X>58)And(X<63)And(Y>44)And(Y<52) Then
|
|
CalChoosenLand = CalBLBremen
|
|
|
|
ElseIf (X>52)And(X<95)And(Y>8)And(Y<40) Then
|
|
CalChoosenLand = CalBLSchlHolstein
|
|
|
|
ElseIf (X>90)And(X<149)And(Y>23)And(Y<48) Then
|
|
CalChoosenLand = CalBLMeckPomm
|
|
|
|
ElseIf (X>28)And(X<90)And(Y>35)And(Y<69) Then
|
|
CalChoosenLand = CalBLNiedersachsen
|
|
|
|
ElseIf (X>60)And(X<90)And(Y>=69)And(Y<95) Then
|
|
CalChoosenLand = CalBLNiedersachsen
|
|
|
|
ElseIf (X>=90)And(X<=115)And(Y>47)And(Y<95) Then
|
|
CalChoosenLand = CalBLSachsenAnhalt
|
|
|
|
ElseIf (X>129)And(X<139)And(Y>60)And(Y<66) Then
|
|
CalChoosenLand = CalBLBerlin
|
|
|
|
ElseIf (X>115)And(X<151)And(Y>=48)And(Y<88) Then
|
|
CalChoosenLand = CalBLBrandenburg
|
|
End If
|
|
CalGetGermanLandAtMousePos = CalChoosenLand
|
|
End Function
|
|
|
|
|
|
|
|
Sub CalFindWholeYearHolidays_GERMANY(ByVal iSelYear as Integer, ByVal iCountry as Integer)
|
|
Dim So as Integer
|
|
Dim OsternDate&, VierterAdvent&
|
|
|
|
If (iCountry < 1) Or (iCountry > 16) Then
|
|
iCountry = CalBLHamburg
|
|
End If
|
|
OsternDate& = CalEasterTable&(iSelYear)
|
|
So = 1
|
|
|
|
CalInsertBankholiday(DateSerial(iSelYear, 1, 1), "Neujahr", cHolidayType_Full)
|
|
|
|
If (iCountry = CalBLBayern) Or (iCountry = CalBLBadenWuert) Or (iCountry = CalBLSachsenAnhalt) Then
|
|
CalInsertBankholiday(DateSerial(iSelYear, 1, 6), "Hl. 3 Könige", cHolidayType_Full)
|
|
End If
|
|
|
|
CalInsertBankholiday(OsternDate&-2, "Karfreitag", cHolidayType_Full)
|
|
CalInsertBankholiday(OsternDate&, "Ostersonntag", cHolidayType_Full)
|
|
CalInsertBankholiday(OsternDate&+1, "Ostermontag", cHolidayType_Full)
|
|
CalInsertBankholiday(DateSerial(iSelYear, 5, 1), "Maifeiertag", cHolidayType_Full)
|
|
CalInsertBankholiday(OsternDate&+39, "Christi Himmelfahrt", cHolidayType_Full)
|
|
CalInsertBankholiday(OsternDate&+49, "Pfingstsonntag", cHolidayType_Full)
|
|
CalInsertBankholiday(OsternDate&+50, "Pfingstmontag", cHolidayType_Full)
|
|
|
|
If (iCountry = CalBLBadenWuert) Or (iCountry = CalBLBayern) Or (iCountry = CalBLHessen) Or (iCountry = CalBLNordRheinWest) Or (iCountry = CalBLRheinlandPfalz) Or (iCountry = CalBLSaarland) Or (iCountry = CalBLSachsen) Or (iCountry = CalBLThueringen) Then
|
|
CalInsertBankholiday(OsternDate&+60, "Fronleichnam", cHolidayType_Full)
|
|
End If
|
|
|
|
If (iCountry = CalBLBayern) Or (iCountry = CalBLSaarland) Then
|
|
CalInsertBankholiday(DateSerial(iSelYear, 8, 15), "Mariä Himmelfahrt", cHolidayType_Full)
|
|
End If
|
|
|
|
CalInsertBankholiday(DateSerial(iSelYear, 10, 3), "Tag der dt. Einheit", cHolidayType_Full)
|
|
|
|
If (iCountry=CalBLBrandenburg) Or (iCountry=CalBLMeckPomm) Or (iCountry=CalBLSachsenAnhalt) Or (iCountry=CalBLSachsen) Or (iCountry=CalBLThueringen) Then
|
|
CalInsertBankholiday(DateSerial(iSelYear, 10, 31), "Reformationstag", cHolidayType_Full)
|
|
End If
|
|
|
|
If (iCountry = CalBLBadenWuert) Or (iCountry = CalBLBayern) Or (iCountry = CalBLNordRheinWest) Or (iCountry = CalBLRheinlandPfalz) Or (iCountry = CalBLSaarland) Or (iCountry = CalBLSachsen) Or (iCountry = CalBLThueringen) Then
|
|
CalInsertBankholiday(DateSerial(iSelYear, 11, 1), "Allerheiligen", cHolidayType_Full)
|
|
End If
|
|
|
|
vierterAdvent = DateSerial(iSelYear, 12, 24)
|
|
While WeekDay(vierterAdvent) <> So
|
|
vierterAdvent = vierterAdvent - 1
|
|
Wend
|
|
|
|
If iCountry = CalBLSachsen Then
|
|
CalInsertBankholiday(vierterAdvent-32, "Buß- und Bettag", cHolidayType_Full)
|
|
Else
|
|
CalInsertBankholiday(vierterAdvent-32, "Buß- und Bettag", cHolidayType_Half)
|
|
End If
|
|
CalInsertBankholiday(vierterAdvent-21, "1. Advent", cHolidayType_Full)
|
|
CalInsertBankholiday(vierterAdvent-14, "2. Advent", cHolidayType_Full)
|
|
CalInsertBankholiday(vierterAdvent-7, "3. Advent", cHolidayType_Full)
|
|
CalInsertBankholiday(vierterAdvent, "4. Advent", cHolidayType_Full)
|
|
|
|
CalInsertBankholiday(Dateserial(iSelYear, 12, 24), "Heiligabend", cHolidayType_Half)
|
|
CalInsertBankholiday(Dateserial(iSelYear, 12, 25), "1. Weihnachtstag", cHolidayType_Full)
|
|
CalInsertBankholiday(Dateserial(iSelYear, 12, 26), "2. Weihnachtstag", cHolidayType_Full)
|
|
CalInsertBankholiday(Dateserial(iSelYear, 12, 31), "Sylvester", cHolidayType_Half)
|
|
End Sub
|
|
</script:module> |