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
6 Call CalAutopilotTable()
10 Sub FindWholeYearHolidays_FRANCE(ByVal YearInt as Integer)
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 +
1,
"Lundi de Pâques
", cHolidayType_Full)
17 CalInsertBankholiday(lEasterDate +
39,
"Ascension
", cHolidayType_Full)
18 CalInsertBankholiday(lEasterDate +
49,
"Pentecôte
", cHolidayType_Full)
19 CalInsertBankholiday(lEasterDate +
50,
"Lundi de Pentecôte
", cHolidayType_Full)
20 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"Fête du travail
", cHolidayType_Full)
21 CalInsertBankholiday(DateSerial(YearInt,
5,
8),
"Victoire
1945", cHolidayType_Full)
22 CalInsertBankholiday(DateSerial(YearInt,
7,
14),
"Fête Nationale
", cHolidayType_Full)
23 CalInsertBankholiday(DateSerial(YearInt,
8,
15),
"Assomption
", cHolidayType_Full)
24 CalInsertBankholiday(DateSerial(YearInt,
11,
1),
"Toussaint
", cHolidayType_Full)
25 CalInsertBankholiday(DateSerial(YearInt,
11,
11),
"Armistice ou Victoire
1918", cHolidayType_Full)
26 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Noël
", cHolidayType_Full)
30 Sub FindWholeYearHolidays_SWED(ByVal YearInt as Integer)
32 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Nyårsdagen
", cHolidayType_Full)
33 CalInsertBankholiday(DateSerial(YearInt,
1,
6),
"Trettondagen
", cHolidayType_Full)
34 lDate = CalEasterTable(YearInt)
35 CalInsertBankholiday(lDate -
2,
"Långfredagen
", cHolidayType_Full)
36 CalInsertBankholiday(lDate,
"Påskdagen
", cHolidayType_Full)
37 CalInsertBankholiday(lDate +
1,
"Annandag påsk
", cHolidayType_Full)
38 CalInsertBankholiday(lDate +
39,
"Kristi himmelfärds dag
", cHolidayType_Full)
39 CalInsertBankholiday(lDate +
49,
"Pingstdagen
", cHolidayType_Full)
40 CalInsertBankholiday(lDate +
50,
"Annandag pingst
", cHolidayType_Full)
41 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"1:a maj
", cHolidayType_Full)
42 ' MidSummerfeast (next Sunday after
20th June)
43 CalInsertBankholiday(GetNextWeekday(YearInt,
6,
20,
7),
"Midsommardagen
", cHolidayType_Full)
44 CalInsertBankholiday(GetNextWeekDay(YearInt,
10,
31,
7),
"Alla helgons dag
", cHolidayType_Full)
45 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Juldagen
", cHolidayType_Full)
46 CalInsertBankholiday(DateSerial(YearInt,
12,
26),
"Annandag jul
", cHolidayType_Full)
51 Sub FindWholeYearHolidays_FI(ByVal YearInt as Integer)
54 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Uudenvuodenpäivä
", cHolidayType_Full)
55 ' "the three Magi
"
56 CalInsertBankholiday(DateSerial(YearInt,
1,
6),
"Loppiainen
", cHolidayType_Half)
57 OsternDate = CalEasterTable(YearInt)
58 CalInsertBankholiday(OsternDate-
2,
"Pitkäperjantai
", cHolidayType_Full)
59 CalInsertBankholiday(OsternDate,
"Pääsiäispäivä
", cHolidayType_Full)
60 CalInsertBankholiday(OsternDate+
1,
"2. pääsiäispäivä
", cHolidayType_Full)
62 CalInsertBankholiday(OsternDate+
39,
"Helatorstai
", cHolidayType_Full)
64 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"Vappu, suomalaisen työn päivä
", cHolidayType_Full)
65 ' Mothers Day :
2nd Sunday in May, Full
66 CalInsertBankholiday(GetMonthDate(YearInt,
5,
1,
7),
"Äitienpäivä
", cHolidayType_Full)
67 ' MidSummerfeast (next Sunday after
20th June)
68 CalInsertBankholiday(GetNextWeekday(YearInt,
6,
20,
7),
"Juhannus, Suomen lipun päivä
", cHolidayType_Full)
69 ' Independance day
70 CalInsertBankholiday(DateSerial(YearInt,
12,
6),
"Itsenäisyyspäivä
", cHolidayType_Full)
72 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Joulupäivä
", cHolidayType_Full)
73 CalInsertBankholiday(DateSerial(YearInt,
12,
26),
"Tapaninpäivä
", cHolidayType_Full)
78 Sub FindWholeYearHolidays_DK (ByVal YearInt as Integer)
79 Dim lDate
&, VierterAdvent
&
82 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Nytårsdag
", cHolidayType_Full)
83 lDate = CalEasterTable (YearInt)
85 CalInsertBankholiday(lDate-
49,
"Fastelavn
", cHolidayType_Half)
86 '"Maundy Tuesday
87 CalInsertBankholiday(lDate-
3,
"Skærtorsdag
", cHolidayType_Full)
88 '"Good Friday
"
89 CalInsertBankholiday(lDate-
2,
"Langfredag
", cHolidayType_Full)
91 CalInsertBankholiday(lDate,
"Påskesøndag
", cHolidayType_Full)
93 CalInsertBankholiday(lDate+
1,
"2. påskedag
", cHolidayType_Full)
94 ' 4th Friday after Easter
95 CalInsertBankholiday(lDate+
26,
"Store bededag
", cHolidayType_Full)
96 ' "Ascension Day
97 CalInsertBankholiday(lDate+
39,
"Kristi himmelfahrt
", cHolidayType_Full)
98 ' "Whitsunday
"
99 CalInsertBankholiday(lDate+
49,
"Pinsesøndag
", cHolidayType_Full)
100 ' "Whitmonday
"
101 CalInsertBankholiday(lDate+
50,
"2. pinsedag
", cHolidayType_Full)
102 CalInsertBankholiday(DateSerial(YearInt,
6,
5),
"Grundlovsdag
", cHolidayType_Full)
104 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"1. juledag
", cHolidayType_Full)
105 CalInsertBankholiday(DateSerial(YearInt,
12,
26),
"2. juledag
", cHolidayType_Full)
106 CalInsertBankholiday(DateSerial(YearInt,
1,
6),
"Hellig
3 konger
", cHolidayType_Half)
107 CalInsertBankholiday(DateSerial(YearInt,
3,
28),
"Dr. Ingrid
", cHolidayType_Half)
108 CalInsertBankholiday(DateSerial(YearInt,
4,
16),
"Dr. Margrete
", cHolidayType_Half)
109 CalInsertBankholiday(DateSerial(YearInt,
4,
16),
"Palmesøndag
", cHolidayType_Half)
110 ' "Liberation day
"
111 CalInsertBankholiday(DateSerial(YearInt,
5,
5),
"Befrielsesdag
", cHolidayType_Half)
112 CalInsertBankholiday(DateSerial(YearInt,
5,
26),
"Krpr. Frederik
", cHolidayType_Half)
113 CalInsertBankholiday(DateSerial(YearInt,
6,
7),
"Pr. Joachim
", cHolidayType_Half)
114 CalInsertBankholiday(DateSerial(YearInt,
6,
11),
"Pr. Henrik
", cHolidayType_Half)
115 CalInsertBankholiday(DateSerial(YearInt,
6,
15),
"Valdemarsdag
", cHolidayType_Half)
116 CalInsertBankholiday(DateSerial(YearInt,
6,
24),
"Skt. Hans
", cHolidayType_Half)
117 CalInsertBankholiday(DateSerial(YearInt,
6,
30),
"Prinsesse Alexandra
", cHolidayType_Half)
118 CalInsertBankholiday(DateSerial(YearInt,
8,
28),
"Pr. Nikolai
", cHolidayType_Half)
119 CalInsertBankholiday(DateSerial(YearInt,
10,
24),
"FN-dag
", cHolidayType_Half)
120 CalInsertBankholiday(DateSerial(YearInt,
11,
11),
"Morten Bisp
", cHolidayType_Half)
121 ' all half (Memorial Days)
122 '"adventdays
123 VierterAdvent = DateSerial(YearInt,
12,
24)
124 While (Weekday(VierterAdvent)
<> 1)
125 vierterAdvent = vierterAdvent -
1
127 CalInsertBankholiday(vierterAdvent-
21,
"1. søndag i advent
", cHolidayType_Half)
128 CalInsertBankholiday(vierterAdvent-
14,
"2. søndag i advent
", cHolidayType_Half)
129 CalInsertBankholiday(vierterAdvent-
7,
"3. søndag i advent
", cHolidayType_Half)
130 CalInsertBankholiday(vierterAdvent,
"4. søndag i advent
", cHolidayType_Half)
132 CalInsertBankholiday(DateSerial(YearInt,
12,
24),
"Juleaften
", cHolidayType_Half)
133 '"New Year
's eve
"
134 CalInsertBankholiday(DateSerial(YearInt,
12,
31),
"Nytårsaften
", cHolidayType_Half)
138 Sub FindWholeYearHolidays_ITA(ByVal YearInt as Integer)
140 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Capodanno
", cHolidayType_Full)
141 CalInsertBankholiday(DateSerial(YearInt,
1,
6),
"Epifania
", cHolidayType_Full)
142 CalInsertBankholiday(DateSerial(YearInt,
4,
25),
"Festa della liberazione
", cHolidayType_Full)
143 CalInsertBankholiday(DateSerial(YearInt,
8,
15),
"Ferragusto
", cHolidayType_Full)
144 CalInsertBankholiday(DateSerial(YearInt,
11,
1),
"Tutti i Santi
", cHolidayType_Full)
145 CalInsertBankholiday(DateSerial(YearInt,
12,
8),
"Immacolata concezione
", cHolidayType_Full)
146 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Natale
", cHolidayType_Full)
147 CalInsertBankholiday(DateSerial(YearInt,
12,
26),
"Santo Stefano
", cHolidayType_Full)
148 lDate = CalEasterTable(YearInt)
149 CalInsertBankholiday(lDate,
"Pasqua
", cHolidayType_Full)
150 CalInsertBankholiday(lDate+
1,
"Lunedì dell
'Angelo
", cHolidayType_Full)
155 Sub FindWholeYearHolidays_TRK(ByVal YearInt as Integer)
157 ' New Years
' Day
158 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Yılbaşı
", cHolidayType_Full)
159 ' National Sovereignty and Children
's Day
160 CalInsertBankholiday(DateSerial(YearInt,
4,
23),
"Ulusal Egemenlik ve Çocuk Bayramı
", cHolidayType_Full)
161 ' Ataturk Commemoration and Youth
& Sports Day
162 CalInsertBankholiday(DateSerial(YearInt,
5,
19),
"Atatürk
'ü Anma, Gençlik ve Spor Bayramı
", cHolidayType_Full)
163 ' Mothers Day :
2nd Sunday in May, Full
164 CalInsertBankholiday(GetMonthDate(YearInt,
5,
1,
7),
"Anneler günü
", cHolidayType_Full)
165 ' Fathers Day:
3rd Sunday in May, Full
166 CalInsertBankholiday(GetMonthDate(YearInt,
6,
1,
14),
"Babalar Günü
", cHolidayType_Full)
168 CalInsertBankholiday(DateSerial(YearInt,
8,
30),
"Zafer Bayramı
", cHolidayType_Full)
170 CalInsertBankholiday(DateSerial(YearInt,
10,
28),
"Cumhuriyet Bayramı
", cHolidayType_Full)
172 CalInsertBankholiday(DateSerial(YearInt,
10,
29),
"Cumhuriyet Bayramı
", cHolidayType_Full)
173 ' Commemoration Of Ataturk-Anniversary of Ataturk
's Death
174 CalInsertBankholiday(DateSerial(YearInt,
11,
10),
"Atatürk
'ün Ölüm Günü
", cHolidayType_Full)
175 CalculateturkishReligousHolidays(YearInt)
179 Sub CalculateturkishReligousHolidays(iSelYear as Integer)
180 Dim lKurbanBayRamStartDate as Long
181 Dim lRamazanBayRamStartDate as Long
185 lKurbanBayRamStartDate = DateSerial(iSelYear,
2,
21)
186 lRamazanBayRamStartDate = DateSerial(iSelYear,
12,
4)
188 lKurbanBayRamStartDate = DateSerial(iSelYear,
2,
10)
189 lRamazanBayRamStartDate = DateSerial(iSelYear,
11,
24)
191 lKurbanBayRamStartDate = DateSerial(iSelYear,
1,
31)
192 lRamazanBayRamStartDate = DateSerial(iSelYear,
11,
13)
194 lKurbanBayRamStartDate = DateSerial(iSelYear,
1,
19)
195 lRamazanBayRamStartDate = DateSerial(iSelYear,
11,
2)
197 lKurbanBayRamStartDate = DateSerial(iSelYear,
12,
30)
198 CalInsertBankholiday(lKurbanBayRamStartDate,
"Kurban Bayramı Arefesi
", cHolidayType_Half)
199 CalInsertBankholiday(DateSerial(iSelYear,
12,
31),
"Kurban Bayram
", cHolidayType_Full)
201 lKurbanBayRamStartDate = DateSerial(iSelYear,
1,
9)
202 lRamazanBayRamStartDate = DateSerial(iSelYear,
10,
22)
204 lKurbanBayRamStartDate = DateSerial(iSelYear,
1,
1)
205 ' Note: The first day has already been in
2006!!!
206 AddFollowUpHolidays(lKurbanBayRamStartDate-
1,
3,
"Kurban Bayram
", cHolidayType_Full)
207 lKurbanBayRamStartDate = DateSerial(iSelYear,
12,
19)
209 lRamazanBayRamStartDate = DateSerial(iSelYear,
10,
11)
211 lKurbanBayRamStartDate = DateSerial(iSelYear,
12,
7)
212 lRamazanBayRamStartDate = DateSerial(iSelYear,
9,
29)
216 'Feast Of the Sacrifice Eve
217 CalInsertBankholiday(lKurbanBayRamStartDate,
"Kurban Bayramı Arefesi
", cHolidayType_Half)
218 'Feast Of the Sacrifice
219 AddFollowUpHolidays(lKurbanBayRamStartDate,
4,
"Kurban Bayram
", cHolidayType_Full)
220 ' End of Ramadan Eve
221 CalInsertBankholiday(lRamazanBayRamStartDate,
"Ramazan (Şeker) Bayramı Arefesi
", cHolidayType_Half)
222 ' End of Ramadan
223 AddFollowUpHolidays(lRamazanBayRamStartDate,
3,
"Ramazan (Şeker) Bayramı
", cHolidayType_Full)
227 Sub FindWholeYearHolidays_GREEK(ByVal YearInt as Integer)
230 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Πρωτοχρονιά
", cHolidayType_Full)
232 CalInsertBankholiday(DateSerial(YearInt,
12,
30),
"Τριών Ιεραρχών
", cHolidayType_Full)
233 ' This is both a National Holiday and a religious holiday
234 CalInsertBankholiday(DateSerial(YearInt,
3,
25),
"Εθνική Εορτή Ευαγγελισμός Θεοτόκου
", cHolidayType_Full)
236 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"Πρωτομαγιά
", cHolidayType_Full)
237 ' Assumption Day
238 CalInsertBankholiday(DateSerial(YearInt,
8,
15),
"Κοίμηση της Θεοτόκου
", cHolidayType_Full)
239 ' National Resistance Day
240 CalInsertBankholiday(DateSerial(YearInt,
10,
28),
"Εθνική Εορτή
", cHolidayType_Full)
241 ' School Holiday
242 CalInsertBankholiday(DateSerial(YearInt,
11,
17),
"Επέτειος του Πολυτεχνείου
", cHolidayType_Full)
244 CalInsertBankholiday(DateSerial(YearInt,
12,
24),
"Παραμονή Χριστουγέννων
", cHolidayType_Full)
246 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Χριστούγεννα
", cHolidayType_Full)
248 CalInsertBankholiday(DateSerial(YearInt,
12,
26),
"Δεύτερη μέρα Χριστουγέννων
", cHolidayType_Full)
249 lDate = CalOrthodoxEasterTable(YearInt)
251 CalInsertBankholiday(lDate-
70,
"Αρχή Τριωδίου
", cHolidayType_Full)
253 CalInsertBankholiday(lDate-
56,
"Τσικνοπέμπτη
", cHolidayType_Full)
254 ' First Day of Lent
255 CalInsertBankholiday(lDate-
48,
"Καθαρή Δευτέρα
", cHolidayType_Full)
256 ' Saturday of Lazarus
257 CalInsertBankholiday(lDate-
8,
"Σάββατο του Λαζάρου
", cHolidayType_Full)
259 CalInsertBankholiday(lDate-
7,
"Κυριακή των Βαΐων
", cHolidayType_Full)
260 ' Monday before Easter
261 CalInsertBankholiday(lDate-
6,
"Μεγάλη Δευτέρα
", cHolidayType_Full)
262 ' Tuesday before Easter
263 CalInsertBankholiday(lDate-
5,
"Μεγάλη Τρίτη
", cHolidayType_Full)
264 ' Wednesday before Easter
265 CalInsertBankholiday(lDate-
4,
"Μεγάλη Τετάρτη
", cHolidayType_Full)
266 ' Thursday before Easter
267 CalInsertBankholiday(lDate-
3,
"Μεγάλη Πέμπτη
", cHolidayType_Full)
269 CalInsertBankholiday(lDate-
2,
"Μεγάλη Παρασκευή
", cHolidayType_Full)
270 ' Saturday before Easter
271 CalInsertBankholiday(lDate-
1,
"Μεγάλο Σάββατο
", cHolidayType_Full)
273 CalInsertBankholiday(lDate+
1,
"Δευτέρα του Πάσχα
", cHolidayType_Full)
275 CalInsertBankholiday(lDate+
49,
"Κυριακή της Πεντηκοστής
", cHolidayType_Full)
277 CalInsertBankholiday(lDate+
39,
"Του Αγίου Πνεύματος
", cHolidayType_Full)
278 ' All Saints Day
279 CalInsertBankholiday(lDate+
56,
"Των Αγίων Πάντων
", cHolidayType_Full)
284 Sub FindWholeYearHolidays_SPAIN(ByVal YearInt as Integer)
286 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Año Nuevo
", cHolidayType_Full)
287 CalInsertBankholiday(DateSerial(YearInt,
1,
6),
"Reyes
", cHolidayType_Full)
288 lDate = CalEasterTable(YearInt)
289 CalInsertBankholiday(lDate-
2,
"Viernes Santo
", cHolidayType_Full)
290 CalInsertBankholiday(lDate+
1,
"Lunes de Pascua Florida
", cHolidayType_Full)
291 CalInsertBankholiday(lDate+
39,
"Día de la Ascensión
", cHolidayType_Full)
292 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"Fiesta del Trabajo
", cHolidayType_Full)
293 CalInsertBankholiday(DateSerial(YearInt,
8,
15),
"Día de la Asunción
", cHolidayType_Full)
294 CalInsertBankholiday(DateSerial(YearInt,
10,
12),
"Fiesta de la Hispanidad
", cHolidayType_Full)
295 CalInsertBankholiday(DateSerial(YearInt,
11,
1),
"Todos los Santos
", cHolidayType_Full)
296 CalInsertBankholiday(DateSerial(YearInt,
12,
6),
"Día de la Constitución
", cHolidayType_Full)
297 CalInsertBankholiday(DateSerial(YearInt,
12,
8),
"La Inmaculada
", cHolidayType_Full)
298 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Navidad
", cHolidayType_Full)
302 Sub FindWholeYearHolidays_PORT(ByVal YearInt as Integer)
304 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Ano Novo
", cHolidayType_Full)
305 CalInsertBankholiday(DateSerial(YearInt,
1,
6),
"Reis Magos
", cHolidayType_Half)
306 lDate = CalEasterTable(YearInt)
307 CalInsertBankholiday(lDate-
47,
"Carnaval
", cHolidayType_Full)
308 CalInsertBankholiday(lDate-
7,
"Domingo de Ramos
", cHolidayType_Half)
309 CalInsertBankholiday(lDate-
2,
"Sexta-feira Santa
", cHolidayType_Full)
310 CalInsertBankholiday(lDate,
"Páscoa
", cHolidayType_Full)
311 CalInsertBankholiday(DateSerial(YearInt,
4,
25),
"25 de Abril
", cHolidayType_Full)
312 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"Dia do Trabalhador
", cHolidayType_Full)
313 CalInsertBankholiday(DateSerial(YearInt,
5,
29),
"Corpo de Deus
", cHolidayType_Full)
314 CalInsertBankholiday(DateSerial(YearInt,
6,
10),
"Dia de Camões e das Comunidades Portuguesas
", cHolidayType_Full)
315 CalInsertBankholiday(DateSerial(YearInt,
6,
24),
"S. João
", cHolidayType_Full)
316 CalInsertBankholiday(DateSerial(YearInt,
6,
29),
"S. Pedro
", cHolidayType_Full)
317 CalInsertBankholiday(DateSerial(YearInt,
8,
15),
"Assunção de Nossa Senhora
", cHolidayType_Full)
318 CalInsertBankholiday(DateSerial(YearInt,
10,
5),
"Implantação da República
", cHolidayType_Full)
319 CalInsertBankholiday(DateSerial(YearInt,
11,
1),
"Dia de Todos os Santos
", cHolidayType_Full)
320 CalInsertBankholiday(DateSerial(YearInt,
12,
8),
"Imaculada Conceição
", cHolidayType_Full)
321 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Natal
", cHolidayType_Full)
322 CalInsertBankholiday(DateSerial(YearInt,
12,
1),
"Restauração da Independência
", cHolidayType_Full)
323 CalInsertBankholiday(DateSerial(YearInt,
12,
31),
"Passagem de Ano
", cHolidayType_Half)
327 Sub FindWholeYearHolidays_NL(ByVal YearInt as Integer)
329 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Nieuwjaarsdag
", cHolidayType_Full)
330 lDate = CalEasterTable(YearInt)
331 CalInsertBankholiday(lDate,
"1e Paasdag
", cHolidayType_Full)
332 CalInsertBankholiday(lDate +
1,
"2e Paasdag
", cHolidayType_Full)
333 CalInsertBankholiday(lDate +
39,
"Hemelvaartsdag
", cHolidayType_Full)
334 CalInsertBankholiday(lDate +
49,
"1e Pinksterdag
", cHolidayType_Full)
335 CalInsertBankholiday(lDate +
50,
"2e Pinksterdag
", cHolidayType_Full)
336 CalInsertBankholiday(DateSerial(YearInt,
4,
30),
"Koninginnedag
", cHolidayType_Full)
337 ' Bevrijdingsdag is celebrated every
5th year
338 If YearInt Mod
5 =
0 then
339 CalInsertBankholiday(DateSerial(YearInt,
5,
5),
"Bevrijdingsdag
", cHolidayType_Full)
341 CalInsertBankholiday(DateSerial(YearInt,
12,
6),
"Sinterklaas
", cHolidayType_Half)
342 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"1e Kerstdag
", cHolidayType_Full)
343 CalInsertBankholiday(DateSerial(YearInt,
12,
26),
"2e Kerstdag
", cHolidayType_Full)
347 Sub FindWholeYearHolidays_PL (ByVal YearInt as Integer)
348 Dim lDate
&, OsternDate
&
350 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Nowy Rok
", cHolidayType_Full)
351 ' "the three Magi
"
352 CalInsertBankholiday(DateSerial(YearInt,
1,
6),
"Trzech Króli
", cHolidayType_Half)
353 ' "Womens
' Day
"
354 CalInsertBankholiday(DateSerial(YearInt,
3,
8),
"Dzień Kobiet
", cHolidayType_Half)
355 OsternDate = CalEasterTable(YearInt)
356 CalInsertBankholiday(OsternDate-
2,
"Wielki Piątek
", cHolidayType_Full)
357 CalInsertBankholiday(OsternDate,
"Wielka Niedziela
", cHolidayType_Full)
358 CalInsertBankholiday(OsternDate+
1,
"Lany Poniedziałek
", cHolidayType_Full)
360 CalInsertBankholiday(OsternDate+
39,
"Wniebowstąpienie
", cHolidayType_Full)
362 CalInsertBankholiday(OsternDate+
49,
"Zielone Świątki
", cHolidayType_Full)
363 ' Feast of Corpus Christi
364 CalInsertBankholiday(OsternDate+
60,
"Boże Ciało
", cHolidayType_Full)
366 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"Święto pracy
", cHolidayType_Full)
367 ' Memorial day of constitution
368 CalInsertBankholiday(DateSerial(YearInt,
5,
3),
"Dzień konstytucji
3-go maja
", cHolidayType_Full)
369 ' "Childrens
' day
"
370 CalInsertBankholiday(DateSerial(YearInt,
6,
1),
"Dzień Dziecka
", cHolidayType_Half)
371 ' "Ascension Day
"
372 CalInsertBankholiday(DateSerial(YearInt,
8,
15),
"Matki Boskiej Zielnej
", cHolidayType_Half)
373 ' "All Saints
' Day
"
374 CalInsertBankholiday(DateSerial(YearInt,
11,
1),
"Wszystkich Świętych
", cHolidayType_Full)
375 ' National day
"
376 CalInsertBankholiday(DateSerial(YearInt,
11,
11),
"Dzień Niepodległości
", cHolidayType_Full)
378 CalInsertBankholiday(DateSerial(YearInt,
12,
24),
"Wigilia
", cHolidayType_Half)
380 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Boże Narodzenie
", cHolidayType_Full)
381 CalInsertBankholiday(DateSerial(YearInt,
12,
26),
"Boże Narodzenie
", cHolidayType_Full)
382 ' "New Year
's eve
"
383 CalInsertBankholiday(DateSerial(YearInt,
12,
31),
"Sylwester
", cHolidayType_Half)
387 Sub FindWholeYearHolidays_RU (ByVal YearInt as Integer)
390 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"Новый Год
", cHolidayType_Full)
391 CalInsertBankholiday(DateSerial(YearInt,
1,
2),
"Новый Год
", cHolidayType_Full)
392 ' Russian Christmas
"
393 CalInsertBankholiday(DateSerial(YearInt,
1,
7),
"Рождество
", cHolidayType_Full)
394 'Day of Defender of Motherland
395 CalInsertBankholiday(DateSerial(YearInt,
2,
23),
"День Защитника Отечества
", cHolidayType_Full)
397 CalInsertBankholiday(DateSerial(YearInt,
3,
8),
"Международный Женский День
", cHolidayType_Full)
398 ' Spring and labor holiday
399 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"Праздник Весны и Труда
", cHolidayType_Full)
400 CalInsertBankholiday(DateSerial(YearInt,
5,
2),
"Праздник Весны и Труда
", cHolidayType_Full)
401 ' Victory of the second World War
402 CalInsertBankholiday(DateSerial(YearInt,
5,
9),
"День Победы
", cHolidayType_Full)
403 ' Independence Day
404 CalInsertBankholiday(DateSerial(YearInt,
6,
12),
"День Независимости
", cHolidayType_Full)
405 ' Day of Accord and Conciliation
406 CalInsertBankholiday(DateSerial(YearInt,
11,
7),
"День Согласия и Примирения
", cHolidayType_Full)
407 ' Constitution Day
408 CalInsertBankholiday(DateSerial(YearInt,
12,
12),
"День Конституции
", cHolidayType_Full)
412 Sub FindWholeYearHolidays_US(ByVal YearInt as Integer)
414 Dim lFirstNov as Long
415 Dim lElectDate as Long
416 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"New Year
's Day
", cHolidayType_Full)
417 CalInsertBankholiday(DateSerial(YearInt,
2,
2),
"Groundhog Day
", cHolidayType_Half)
418 CalInsertBankholiday(DateSerial(YearInt,
2,
14),
"Valentine
's Day
", cHolidayType_Half)
419 CalInsertBankholiday(DateSerial(YearInt,
3,
17),
"St Patrick
's Day
", cHolidayType_Half)
420 CalInsertBankholiday(DateSerial(YearInt,
4,
1),
"April Fools
' Day
", cHolidayType_Half)
421 CalInsertBankholiday(DateSerial(YearInt,
4,
22),
"Earth Day
", cHolidayType_Half)
422 CalInsertBankholiday(DateSerial(YearInt,
5,
6),
"Nurses
' Day
", cHolidayType_Half)
423 CalInsertBankholiday(DateSerial(YearInt,
6,
14),
"Flag Day
", cHolidayType_Half)
424 CalInsertBankholiday(DateSerial(YearInt,
6,
14),
"Army Day
", cHolidayType_Half)
425 CalInsertBankholiday(DateSerial(YearInt,
6,
19),
"Juneteenth(Liberation of Slaves)
", cHolidayType_Half)
427 CalInsertBankholiday(DateSerial(YearInt,
7,
4),
"Independence Day
", cHolidayType_Full)
428 CalInsertBankholiday(DateSerial(YearInt,
8,
1),
"Air Force Day
", cHolidayType_Half)
429 CalInsertBankholiday(DateSerial(YearInt,
8,
4),
"Coast Guard Day
", cHolidayType_Half)
430 CalInsertBankholiday(DateSerial(YearInt,
9,
17),
"Citizenship Day or Constitution Day
", cHolidayType_Half)
431 CalInsertBankholiday(DateSerial(YearInt,
10,
16),
"Bosses
' Day
", cHolidayType_Half)
432 CalInsertBankholiday(DateSerial(YearInt,
10,
26 ),
"Mother-in-Law
's Day
", cHolidayType_Half)
433 CalInsertBankholiday(DateSerial(YearInt,
10,
27),
"Navy Day
", cHolidayType_Half)
434 CalInsertBankholiday(DateSerial(YearInt,
10,
31),
"Halloween
", cHolidayType_Half)
435 CalInsertBankholiday(DateSerial(YearInt,
11,
10),
"Marine Corps Day
", cHolidayType_Half)
436 CalInsertBankholiday(DateSerial(YearInt,
11,
11),
"Veteran
's Day
", cHolidayType_Full)
437 CalInsertBankholiday(DateSerial(YearInt,
12,
7),
"Pearl Harbor Remembrance Day
", cHolidayType_Half)
438 CalInsertBankholiday(DateSerial(YearInt,
12,
24),
"Christmas Eve
", cHolidayType_Half)
439 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"Christmas Day
", cHolidayType_Full)
440 CalInsertBankholiday(DateSerial(YearInt,
12,
31),
"New Year
's Eve
", cHolidayType_Half)
442 CalInsertBankholiday(CalEasterTable(YearInt),
"Easter Sunday
", cHolidayType_Half)
444 ' Inauguration Day occurs every
4 years (
1997,
2001) in the year following the presidential election
445 ' always on the
20th of January unless this is a Sunday in which case on Monday
21st January
446 If YearInt Mod
4 =
1 Then
447 lDate = DateSerial(YearInt,
1,
20)
448 If WeekDay(lDate) =
1 Then
449 CalInsertBankholiday(lDate +
1,
"Inauguration Day
", cHolidayType_Half)
451 CalInsertBankholiday(lDate,
"Inauguration Day
", cHolidayType_Half)
454 ' First Tuesday in November, but only after the
1st of November and only on evenly numbered years
455 If YearInt Mod
2 =
0 Then
456 lFirstNov = DateSerial(YearInt,
11,
1)
457 lElectDate = GetMonthDate(YearInt,
11,
3,
0)
458 If lElectDate
> lFirstNov Then
459 CalInsertBankholiday(lElectDate,
"Election Day
", cHolidayType_Half)
461 CalInsertBankholiday(lElectDate +
7,
"Election Day
", cHolidayType_Half)
464 CalInsertBankholiday(GetMonthDate(YearInt,
1,
2,
14),
"Martin Luther King Jr Day
", cHolidayType_Full)
465 CalInsertBankholiday(GetMonthDate(YearInt,
2,
2,
14),
"President
's Day
", cHolidayType_Full)
466 ' Mothers Day :
2nd Sunday in May, Full
467 CalInsertBankholiday(GetMonthDate(YearInt,
5,
1,
7),
"Mother
's Day
", cHolidayType_Full)
469 ' Wednesday of the last full week of April Administrative Professionals
' Day (formerly Secretaries
' Day)
470 CalInsertBankholiday(GetMonthDate(YearInt,
5,
7, -
7)-
3,
"Administrative Professionals
' Day
", cHolidayType_Half)
472 CalInsertBankholiday(GetMonthDate(YearInt,
5,
5,
0),
"National Day of Prayer
", cHolidayType_Half)
473 CalInsertBankholiday(GetMonthDate(YearInt,
5,
7,
14),
"Armed Forces Day
", cHolidayType_Half)
474 ' Fathers Day :
3rd Sunday in June
475 CalInsertBankholiday(GetMonthDate(YearInt,
6,
1,
14),
"Father
's Day
", cHolidayType_Half)
477 ' Last Monday in May: Menorial Day, Full
478 CalInsertBankholiday(GetMonthDate(YearInt,
6,
2,
0)-
7,
"Memorial Day
", cHolidayType_Full)
479 CalInsertBankholiday(GetMonthDate(YearInt,
7,
1,
21),
"Parents
' Day
", cHolidayType_Half)
480 CalInsertBankholiday(GetMonthDate(YearInt,
8,
1,
0),
"Friendship Day
", cHolidayType_Half)
482 ' 1st Monday in Sep : Labor Day, Full
483 CalInsertBankholiday(GetMonthDate(YearInt,
9,
2,
0),
"Labor Day
", cHolidayType_Full)
484 ' Sunday after Labor Day Grandparents
' Day
485 CalInsertBankholiday(GetMonthDate(YearInt,
9,
2,
0)+
6,
"Grandparents
' Day
", cHolidayType_Half)
487 CalInsertBankholiday(GetMonthDate(YearInt,
10,
1,
0),
"National Children
's Day
", cHolidayType_Half)
488 CalInsertBankholiday(GetMonthDate(YearInt,
10,
2,
7),
"Columbus Day
", cHolidayType_Full)
489 ' Sweetest Day: Third Saturday in October
490 CalInsertBankholiday(GetMonthDate(YearInt,
10,
7,
14),
"Sweetest Day
", cHolidayType_Half)
491 ' 4th Thu in Nov : Thanksgiving, Full
492 CalInsertBankholiday(GetMonthDate(YearInt,
11,
5,
21),
"Thanksgiving
", cHolidayType_Full)
496 Sub FindWholeYearHolidays_JP(ByVal YearInt as Integer)
498 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"元日
", cHolidayType_Full)
499 ' 2nd Monday in January
500 CalInsertBankholiday(GetMonthDate(YearInt,
1,
2,
7),
"成人の日
", cHolidayType_Full)
501 CalInsertBankholiday(DateSerial(YearInt,
2,
11),
"建国記念の日
", cHolidayType_Full)
502 CalInsertBankholiday(DateSerial(YearInt,
3,
20),
"春分の日
", cHolidayType_Full)
503 CalInsertBankholiday(DateSerial(YearInt,
4,
29),
"みどりの日
", cHolidayType_Full)
504 CalInsertBankholiday(DateSerial(YearInt,
5,
3),
"憲法記念日
", cHolidayType_Full)
505 CalInsertBankholiday(DateSerial(YearInt,
5,
4),
"国民の休日
", cHolidayType_Full)
506 CalInsertBankholiday(DateSerial(YearInt,
5,
5),
"こどもの日
", cHolidayType_Full)
507 CalInsertBankholiday(DateSerial(YearInt,
9,
23),
"秋分の日
", cHolidayType_Full)
508 CalInsertBankholiday(GetMonthDate(YearInt,
10,
2,
7),
"体育の日
", cHolidayType_Full)
509 CalInsertBankholiday(DateSerial(YearInt,
11,
3),
"文化の日
", cHolidayType_Full)
510 CalInsertBankholiday(DateSerial(YearInt,
11,
23),
"勤労感謝の日
", cHolidayType_Full)
511 CalInsertBankholiday(DateSerial(YearInt,
12,
23),
"天皇誕生日
", cHolidayType_Full)
512 If YearInt
> 2002 Then
513 CalInsertBankholiday(GetMonthDate(YearInt,
7,
2,
14),
"海の日
", cHolidayType_Full)
514 CalInsertBankholiday(GetMonthDate(YearInt,
9,
2,
14),
"敬老の日
", cHolidayType_Full)
516 CalInsertBankholiday(DateSerial(YearInt,
7,
20),
"海の日
", cHolidayType_Full)
517 CalInsertBankholiday(DateSerial(YearInt,
9,
15),
"敬老の日
", cHolidayType_Full)
522 Sub FindWholeYearHolidays_TW(YearInt as Integer)
523 CalculateChineseNewYear(YearInt)
524 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"元旦
", cHolidayType_Full)
525 CalInsertBankholiday(DateSerial(YearInt,
2,
28),
"和平紀念日
", cHolidayType_Full)
526 CalInsertBankholiday(DateSerial(YearInt,
3,
8),
"婦女節
", cHolidayType_Half)
527 CalInsertBankholiday(DateSerial(YearInt,
3,
29),
"革命先烈紀念日(青年節)
", cHolidayType_Half)
528 CalInsertBankholiday(DateSerial(YearInt,
4,
4),
"兒童節
", cHolidayType_Half)
529 CalInsertBankholiday(DateSerial(YearInt,
4,
5),
"民族掃墓節
", cHolidayType_Full)
530 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"勞動節
", cHolidayType_Full)
531 CalInsertBankholiday(GetNextWeekDay(YearInt,
5,
19,
2),
"佛陀誕辰紀念日
", cHolidayType_Full)
' Just like Columbus Day
532 CalInsertBankholiday(DateSerial(YearInt,
6,
15),
"端午節
", cHolidayType_Full)
533 CalInsertBankholiday(DateSerial(YearInt,
9,
3),
"軍人節
", cHolidayType_Half)
534 CalInsertBankholiday(DateSerial(YearInt,
9,
21),
"中秋節
", cHolidayType_Full)
535 CalInsertBankholiday(GetNextWeekDay(YearInt,
9,
28,
2),
"孔子誕辰紀念日(教師節)
", cHolidayType_Full)
' Just like Columnbusday
536 CalInsertBankholiday(DateSerial(YearInt,
10,
10),
"國慶日
", cHolidayType_Full)
537 CalInsertBankholiday(DateSerial(YearInt,
10,
25),
"臺灣光復節
", cHolidayType_Half)
538 CalInsertBankholiday(DateSerial(YearInt,
10,
31),
"先總統 蔣公誕辰紀念日
", cHolidayType_Half)
539 CalInsertBankholiday(DateSerial(YearInt,
12,
11),
"國父誕辰紀念日(中華文化復興節)
", cHolidayType_Half)
540 CalInsertBankholiday(DateSerial(YearInt,
12,
25),
"行憲紀念日
", cHolidayType_Half)
544 Sub FindWholeYearHolidays_CN(YearInt as Integer)
545 CalculateChineseNewYear(YearInt)
546 CalInsertBankholiday(DateSerial(YearInt,
1,
1),
"元旦
", cHolidayType_Full)
' New Year
547 CalInsertBankholiday(DateSerial(YearInt,
3,
8),
"妇女节
", cHolidayType_Half)
' Women
's Day
548 CalInsertBankholiday(DateSerial(YearInt,
4,
5),
"清明节
", cHolidayType_Half)
' Day of the deads
549 CalInsertBankholiday(DateSerial(YearInt,
5,
1),
"劳动节
", cHolidayType_Full)
' International Labour Day
550 CalInsertBankholiday(DateSerial(YearInt,
6,
1),
"儿童节
", cHolidayType_Half)
' Children
's Day
551 CalInsertBankholiday(DateSerial(YearInt,
8,
1),
"建军节
", cHolidayType_Half)
' Foundation of military
552 CalInsertBankholiday(DateSerial(YearInt,
10,
1),
"国庆节
", cHolidayType_Full)
' National festival day
556 ' Unfortunately I could not find a Routine to convert a
'Moon Date
' into a gregorian date
557 Sub CalculateChineseNewYear(iSelYear as Integer)
561 lDate = DateSerial(iSelYear,
1,
31)
563 lDate = DateSerial(iSelYear,
2,
19)
565 lDate = DateSerial(iSelYear,
2,
7)
567 lDate = DateSerial(iSelYear,
1,
28)
569 lDate = DateSerial(iSelYear,
2,
16)
571 lDate = DateSerial(iSelYear,
2,
5)
573 lDate = DateSerial(iSelYear,
1,
24)
575 lDate = DateSerial(iSelYear,
2,
12)
577 lDate = DateSerial(iSelYear,
2,
1)
579 lDate = DateSerial(iSelYear,
1,
22)
581 lDate = DateSerial(iSelYear,
2,
9)
583 lDate = DateSerial(iSelYear,
1,
29)
585 lDate = DateSerial(iSelYear,
2,
18)
587 lDate = DateSerial(iSelYear,
2,
7)
589 lDate = DateSerial(iSelYear,
1,
26)
591 lDate = DateSerial(iSelYear,
2,
10)
593 lDate = DateSerial(iSelYear,
2,
3)
595 lDate = DateSerial(iSelYear,
1,
23)
597 lDate = DateSerial(iSelYear,
2,
10)
599 lDate = DateSerial(iSelYear,
1,
31)
601 lDate = DateSerial(iSelYear,
2,
19)
603 lDate = DateSerial(iSelYear,
2,
9)
605 lDate = DateSerial(iSelYear,
1,
28)
607 lDate = DateSerial(iSelYear,
2,
16)
609 lDate = DateSerial(iSelYear,
2,
5)
611 lDate = DateSerial(iSelYear,
1,
25)
615 Select Case sCurCountryLocale
617 CalInsertBankholiday(lDate-
1,
"农历除夕
", cHolidayType_Full)
618 CalInsertBankholiday(lDate,
"春节初一
", cHolidayType_Full)
619 CalInsertBankholiday(lDate+
1,
"春节初二
", cHolidayType_Full)
620 CalInsertBankholiday(lDate+
2,
"春节初三
", cHolidayType_Full)
623 CalInsertBankholiday(lDate-
1,
"農曆除夕
", cHolidayType_Full)
624 CalInsertBankholiday(lDate,
"春節初一
", cHolidayType_Full)
625 CalInsertBankholiday(lDate+
1,
"春節初二
", cHolidayType_Full)
626 CalInsertBankholiday(lDate+
2,
"春節初三
", cHolidayType_Full)
631 Function CalculateJapaneseSpringDay(iSelYear as Integer)
632 If (iSelYear
> 1979) And (iSelYear
< 2100) Then
633 CalculateJapaneseSpringDay() = Int(
20.8431 +
0.242194)* (iSelYear-
1980) - (Int((iSelYear-
1980)/
4))
638 Function CalculateJapaneseAutumnDay(iSelYear as Integer)
639 If (iSelYear
> 1979) And (iSelYear
< 2100) Then
640 CalculateJapaneseAutumnDay() = Int(
23.8431 +
0.242194)* (iSelYear-
1980) - (Int((iSelYear-
1980)/
4))
642 End Function
</script:module>