1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2cdf0e10cSrcweir<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3*3e02b54dSAndrew Rist<!--***********************************************************
4*3e02b54dSAndrew Rist *
5*3e02b54dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
6*3e02b54dSAndrew Rist * or more contributor license agreements.  See the NOTICE file
7*3e02b54dSAndrew Rist * distributed with this work for additional information
8*3e02b54dSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
9*3e02b54dSAndrew Rist * to you under the Apache License, Version 2.0 (the
10*3e02b54dSAndrew Rist * "License"); you may not use this file except in compliance
11*3e02b54dSAndrew Rist * with the License.  You may obtain a copy of the License at
12*3e02b54dSAndrew Rist *
13*3e02b54dSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
14*3e02b54dSAndrew Rist *
15*3e02b54dSAndrew Rist * Unless required by applicable law or agreed to in writing,
16*3e02b54dSAndrew Rist * software distributed under the License is distributed on an
17*3e02b54dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18*3e02b54dSAndrew Rist * KIND, either express or implied.  See the License for the
19*3e02b54dSAndrew Rist * specific language governing permissions and limitations
20*3e02b54dSAndrew Rist * under the License.
21*3e02b54dSAndrew Rist *
22*3e02b54dSAndrew Rist ***********************************************************-->
23cdf0e10cSrcweir<script:module xmlns:script="http://openoffice.org/2000/script" script:name="LocalHolidays" script:language="StarBasic">Option Explicit
24cdf0e10cSrcweir
25cdf0e10cSrcweirSub Main
26cdf0e10cSrcweir	Call CalAutopilotTable()
27cdf0e10cSrcweirEnd Sub
28cdf0e10cSrcweir
29cdf0e10cSrcweir
30cdf0e10cSrcweirSub FindWholeYearHolidays_FRANCE(ByVal YearInt as Integer)
31cdf0e10cSrcweirDim lEasterDate&amp;
32cdf0e10cSrcweirDim lDate&amp;
33cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Jour de l&apos;an&quot;, cHolidayType_Full)
34cdf0e10cSrcweir	lEasterDate = CalEasterTable(YearInt)
35cdf0e10cSrcweir	CalInsertBankholiday(lEasterDate, &quot;Pâques&quot;, cHolidayType_Full)
36cdf0e10cSrcweir	CalInsertBankholiday(lEasterDate + 1, &quot;Lundi de Pâques&quot;, cHolidayType_Full)
37cdf0e10cSrcweir	CalInsertBankholiday(lEasterDate + 39, &quot;Ascension&quot;, cHolidayType_Full)
38cdf0e10cSrcweir	CalInsertBankholiday(lEasterDate + 49, &quot;Pentecôte&quot;, cHolidayType_Full)
39cdf0e10cSrcweir	CalInsertBankholiday(lEasterDate + 50, &quot;Lundi de Pentecôte&quot;, cHolidayType_Full)
40cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Fête du travail&quot;, cHolidayType_Full)
41cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 8), &quot;Victoire 1945&quot;, cHolidayType_Full)
42cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 7, 14), &quot;Fête Nationale&quot;, cHolidayType_Full)
43cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Assomption&quot;, cHolidayType_Full)
44cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Toussaint&quot;, cHolidayType_Full)
45cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Armistice ou Victoire 1918&quot;, cHolidayType_Full)
46cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Noël&quot;, cHolidayType_Full)
47cdf0e10cSrcweirEnd Sub
48cdf0e10cSrcweir
49cdf0e10cSrcweir
50cdf0e10cSrcweirSub FindWholeYearHolidays_SWED(ByVal YearInt as Integer)
51cdf0e10cSrcweirDim lDate&amp;
52cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nyårsdagen&quot;, cHolidayType_Full)
53cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Trettondagen&quot;, cHolidayType_Full)
54cdf0e10cSrcweir	lDate = CalEasterTable(YearInt)
55cdf0e10cSrcweir	CalInsertBankholiday(lDate - 2, &quot;Långfredagen&quot;, cHolidayType_Full)
56cdf0e10cSrcweir	CalInsertBankholiday(lDate, &quot;Påskdagen&quot;, cHolidayType_Full)
57cdf0e10cSrcweir	CalInsertBankholiday(lDate + 1, &quot;Annandag påsk&quot;, cHolidayType_Full)
58cdf0e10cSrcweir	CalInsertBankholiday(lDate + 39, &quot;Kristi himmelfärds dag&quot;, cHolidayType_Full)
59cdf0e10cSrcweir	CalInsertBankholiday(lDate + 49, &quot;Pingstdagen&quot;, cHolidayType_Full)
60cdf0e10cSrcweir	CalInsertBankholiday(lDate + 50, &quot;Annandag pingst&quot;, cHolidayType_Full)
61cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;1:a maj&quot;, cHolidayType_Full)
62cdf0e10cSrcweir	&apos; MidSummerfeast (next Sunday after 20th June)
63cdf0e10cSrcweir	CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), &quot;Midsommardagen&quot;, cHolidayType_Full)
64cdf0e10cSrcweir	CalInsertBankholiday(GetNextWeekDay(YearInt, 10, 31, 7), &quot;Alla helgons dag&quot;, cHolidayType_Full)
65cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Juldagen&quot;, cHolidayType_Full)
66cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Annandag jul&quot;, cHolidayType_Full)
67cdf0e10cSrcweirEnd Sub
68cdf0e10cSrcweir
69cdf0e10cSrcweir
70cdf0e10cSrcweir
71cdf0e10cSrcweirSub FindWholeYearHolidays_FI(ByVal YearInt as Integer)
72cdf0e10cSrcweir	Dim OsternDate&amp;
73cdf0e10cSrcweir	&apos; New Year
74cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Uudenvuodenpäivä&quot;, cHolidayType_Full)
75cdf0e10cSrcweir	&apos; &quot;the three Magi&quot;
76cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Loppiainen&quot;, cHolidayType_Half)
77cdf0e10cSrcweir	OsternDate = CalEasterTable(YearInt)
78cdf0e10cSrcweir	CalInsertBankholiday(OsternDate-2, &quot;Pitkäperjantai&quot;, cHolidayType_Full)
79cdf0e10cSrcweir	CalInsertBankholiday(OsternDate, &quot;Pääsiäispäivä&quot;, cHolidayType_Full)
80cdf0e10cSrcweir	CalInsertBankholiday(OsternDate+1, &quot;2. pääsiäispäivä&quot;, cHolidayType_Full)
81cdf0e10cSrcweir	&apos; Ascension Day
82cdf0e10cSrcweir	CalInsertBankholiday(OsternDate+39, &quot;Helatorstai&quot;, cHolidayType_Full)
83cdf0e10cSrcweir	&apos; First of May
84cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Vappu, suomalaisen työn päivä&quot;, cHolidayType_Full)
85cdf0e10cSrcweir	&apos; Mothers Day : 2nd Sunday in May, Full
86cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), &quot;Äitienpäivä&quot;, cHolidayType_Full)
87cdf0e10cSrcweir	&apos; MidSummerfeast (next Sunday after 20th June)
88cdf0e10cSrcweir	CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), &quot;Juhannus, Suomen lipun päivä&quot;, cHolidayType_Full)
89cdf0e10cSrcweir	&apos; Independance day
90cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 6), &quot;Itsenäisyyspäivä&quot;, cHolidayType_Full)
91cdf0e10cSrcweir	&apos; Christmas
92cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Joulupäivä&quot;, cHolidayType_Full)
93cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Tapaninpäivä&quot;, cHolidayType_Full)
94cdf0e10cSrcweirEnd Sub
95cdf0e10cSrcweir
96cdf0e10cSrcweir
97cdf0e10cSrcweir
98cdf0e10cSrcweirSub FindWholeYearHolidays_DK (ByVal YearInt as Integer)
99cdf0e10cSrcweirDim lDate&amp;, VierterAdvent&amp;
100cdf0e10cSrcweir
101cdf0e10cSrcweir	&apos;New Year
102cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nytårsdag&quot;, cHolidayType_Full)
103cdf0e10cSrcweir	lDate = CalEasterTable (YearInt)
104cdf0e10cSrcweir	&apos; carnival
105cdf0e10cSrcweir	CalInsertBankholiday(lDate-49, &quot;Fastelavn&quot;, cHolidayType_Half)
106cdf0e10cSrcweir	&apos;&quot;Maundy Tuesday
107cdf0e10cSrcweir	CalInsertBankholiday(lDate-3, &quot;Skærtorsdag&quot;, cHolidayType_Full)
108cdf0e10cSrcweir	&apos;&quot;Good Friday  &quot;
109cdf0e10cSrcweir	CalInsertBankholiday(lDate-2, &quot;Langfredag&quot;, cHolidayType_Full)
110cdf0e10cSrcweir	&apos; Easter Sunday
111cdf0e10cSrcweir	CalInsertBankholiday(lDate, &quot;Påskesøndag&quot;, cHolidayType_Full)
112cdf0e10cSrcweir	&apos; Easter Monday
113cdf0e10cSrcweir	CalInsertBankholiday(lDate+1, &quot;2. påskedag&quot;, cHolidayType_Full)
114cdf0e10cSrcweir	&apos; 4th Friday after Easter
115cdf0e10cSrcweir	CalInsertBankholiday(lDate+26, &quot;Store bededag&quot;, cHolidayType_Full)
116cdf0e10cSrcweir	&apos; &quot;Ascension Day
117cdf0e10cSrcweir	CalInsertBankholiday(lDate+39, &quot;Kristi himmelfahrt&quot;, cHolidayType_Full)
118cdf0e10cSrcweir	&apos; &quot;Whitsunday&quot;
119cdf0e10cSrcweir	CalInsertBankholiday(lDate+49, &quot;Pinsesøndag&quot;, cHolidayType_Full)
120cdf0e10cSrcweir	&apos; &quot;Whitmonday&quot;
121cdf0e10cSrcweir	CalInsertBankholiday(lDate+50, &quot;2. pinsedag&quot;, cHolidayType_Full)
122cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 5), &quot;Grundlovsdag&quot;, cHolidayType_Full)
123cdf0e10cSrcweir	&apos;Christmas Days
124cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;1. juledag&quot;, cHolidayType_Full)
125cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;2. juledag&quot;, cHolidayType_Full)
126cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Hellig 3 konger&quot;, cHolidayType_Half)
127cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 28), &quot;Dr. Ingrid&quot;, cHolidayType_Half)
128cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 16), &quot;Dr. Margrete&quot;, cHolidayType_Half)
129cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 16), &quot;Palmesøndag&quot;, cHolidayType_Half)
130cdf0e10cSrcweir	&apos; &quot;Liberation day&quot;
131cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;Befrielsesdag&quot;, cHolidayType_Half)
132cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 26), &quot;Krpr. Frederik&quot;, cHolidayType_Half)
133cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 7), &quot;Pr. Joachim&quot;, cHolidayType_Half)
134cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 11), &quot;Pr. Henrik&quot;, cHolidayType_Half)
135cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 15), &quot;Valdemarsdag&quot;, cHolidayType_Half)
136cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 24), &quot;Skt. Hans&quot;, cHolidayType_Half)
137cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 30), &quot;Prinsesse Alexandra&quot;, cHolidayType_Half)
138cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 28), &quot;Pr. Nikolai&quot;, cHolidayType_Half)
139cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 24), &quot;FN-dag&quot;, cHolidayType_Half)
140cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Morten Bisp&quot;, cHolidayType_Half)
141cdf0e10cSrcweir	&apos; all half (Memorial Days)
142cdf0e10cSrcweir	&apos;&quot;adventdays
143cdf0e10cSrcweir	VierterAdvent = DateSerial(YearInt, 12, 24)
144cdf0e10cSrcweir	While (Weekday(VierterAdvent) &lt;&gt; 1)
145cdf0e10cSrcweir		vierterAdvent = vierterAdvent - 1
146cdf0e10cSrcweir	Wend
147cdf0e10cSrcweir	CalInsertBankholiday(vierterAdvent-21, &quot;1. søndag i advent&quot;, cHolidayType_Half)
148cdf0e10cSrcweir	CalInsertBankholiday(vierterAdvent-14, &quot;2. søndag i advent&quot;, cHolidayType_Half)
149cdf0e10cSrcweir	CalInsertBankholiday(vierterAdvent-7, &quot;3. søndag i advent&quot;, cHolidayType_Half)
150cdf0e10cSrcweir	CalInsertBankholiday(vierterAdvent, &quot;4. søndag i advent&quot;, cHolidayType_Half)
151cdf0e10cSrcweir	&apos;Christmas eve
152cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Juleaften&quot;, cHolidayType_Half)
153cdf0e10cSrcweir	&apos;&quot;New Year&apos;s eve&quot;
154cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Nytårsaften&quot;, cHolidayType_Half)
155cdf0e10cSrcweirEnd Sub
156cdf0e10cSrcweir
157cdf0e10cSrcweir
158cdf0e10cSrcweirSub FindWholeYearHolidays_ITA(ByVal YearInt as Integer)
159cdf0e10cSrcweirDim lDate&amp;
160cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Capodanno&quot;, cHolidayType_Full)
161cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Epifania&quot;, cHolidayType_Full)
162cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 25), &quot;Festa della liberazione&quot;, cHolidayType_Full)
163cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Ferragusto&quot;, cHolidayType_Full)
164cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Tutti i Santi&quot;, cHolidayType_Full)
165cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;Immacolata concezione&quot;, cHolidayType_Full)
166cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Natale&quot;, cHolidayType_Full)
167cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Santo Stefano&quot;, cHolidayType_Full)
168cdf0e10cSrcweir	lDate = CalEasterTable(YearInt)
169cdf0e10cSrcweir	CalInsertBankholiday(lDate, &quot;Pasqua&quot;, cHolidayType_Full)
170cdf0e10cSrcweir	CalInsertBankholiday(lDate+1, &quot;Lunedì dell&apos;Angelo&quot;, cHolidayType_Full)
171cdf0e10cSrcweirEnd Sub
172cdf0e10cSrcweir
173cdf0e10cSrcweir
174cdf0e10cSrcweir
175cdf0e10cSrcweirSub FindWholeYearHolidays_TRK(ByVal YearInt as Integer)
176cdf0e10cSrcweirDim lDate as Long
177cdf0e10cSrcweir	&apos; New Years&apos; Day
178cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Yılbaşı&quot;, cHolidayType_Full)
179cdf0e10cSrcweir	&apos; National Sovereignty and Children&apos;s Day
180cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 23), &quot;Ulusal Egemenlik ve Çocuk Bayramı&quot;, cHolidayType_Full)
181cdf0e10cSrcweir	&apos; Ataturk Commemoration and Youth &amp; Sports Day
182cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 19), &quot;Atatürk&apos;ü Anma, Gençlik ve Spor Bayramı&quot;, cHolidayType_Full)
183cdf0e10cSrcweir	&apos; Mothers Day : 2nd Sunday in May, Full
184cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), &quot;Anneler günü&quot;, cHolidayType_Full)
185cdf0e10cSrcweir	&apos; Fathers Day: 3rd Sunday in May, Full
186cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), &quot;Babalar Günü&quot;, cHolidayType_Full)
187cdf0e10cSrcweir	&apos; Victory Day
188cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 30), &quot;Zafer Bayramı&quot;, cHolidayType_Full)
189cdf0e10cSrcweir	&apos; Republic Day
190cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 28), &quot;Cumhuriyet Bayramı&quot;, cHolidayType_Full)
191cdf0e10cSrcweir	&apos; Republic Day
192cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 29), &quot;Cumhuriyet Bayramı&quot;, cHolidayType_Full)
193cdf0e10cSrcweir	&apos; Commemoration Of Ataturk-Anniversary of Ataturk&apos;s Death
194cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 10), &quot;Atatürk&apos;ün Ölüm Günü&quot;, cHolidayType_Full)
195cdf0e10cSrcweir	CalculateturkishReligousHolidays(YearInt)
196cdf0e10cSrcweirEnd Sub
197cdf0e10cSrcweir
198cdf0e10cSrcweir
199cdf0e10cSrcweirSub CalculateturkishReligousHolidays(iSelYear as Integer)
200cdf0e10cSrcweirDim lKurbanBayRamStartDate as Long
201cdf0e10cSrcweirDim lRamazanBayRamStartDate as Long
202cdf0e10cSrcweir
203cdf0e10cSrcweir	Select Case iSelYear
204cdf0e10cSrcweir		Case 2002
205cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 21)
206cdf0e10cSrcweir			lRamazanBayRamStartDate = DateSerial(iSelYear, 12, 4)
207cdf0e10cSrcweir		Case 2003
208cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 10)
209cdf0e10cSrcweir			lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 24)
210cdf0e10cSrcweir		Case 2004
211cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 31)
212cdf0e10cSrcweir			lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 13)
213cdf0e10cSrcweir		Case 2005
214cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 19)
215cdf0e10cSrcweir			lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 2)
216cdf0e10cSrcweir		Case 2006
217cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 30)
218cdf0e10cSrcweir			CalInsertBankholiday(lKurbanBayRamStartDate, &quot;Kurban Bayramı Arefesi&quot;, cHolidayType_Half)
219cdf0e10cSrcweir			CalInsertBankholiday(DateSerial(iSelYear, 12, 31), &quot;Kurban Bayram&quot;, cHolidayType_Full)
220cdf0e10cSrcweir
221cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 9)
222cdf0e10cSrcweir			lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 22)
223cdf0e10cSrcweir		Case 2007
224cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 1)
225cdf0e10cSrcweir			&apos; Note: The first day has already been in 2006!!!
226cdf0e10cSrcweir			AddFollowUpHolidays(lKurbanBayRamStartDate-1, 3, &quot;Kurban Bayram&quot;, cHolidayType_Full)
227cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 19)
228cdf0e10cSrcweir
229cdf0e10cSrcweir			lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 11)
230cdf0e10cSrcweir		Case 2008
231cdf0e10cSrcweir			lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 7)
232cdf0e10cSrcweir			lRamazanBayRamStartDate = DateSerial(iSelYear, 9, 29)
233cdf0e10cSrcweir		Case Else
234cdf0e10cSrcweir			Exit Sub
235cdf0e10cSrcweir	End Select
236cdf0e10cSrcweir	&apos;Feast Of the Sacrifice Eve
237cdf0e10cSrcweir	CalInsertBankholiday(lKurbanBayRamStartDate, &quot;Kurban Bayramı Arefesi&quot;, cHolidayType_Half)
238cdf0e10cSrcweir	&apos;Feast Of the Sacrifice
239cdf0e10cSrcweir	AddFollowUpHolidays(lKurbanBayRamStartDate, 4, &quot;Kurban Bayram&quot;, cHolidayType_Full)
240cdf0e10cSrcweir	&apos; End of Ramadan Eve
241cdf0e10cSrcweir	CalInsertBankholiday(lRamazanBayRamStartDate, &quot;Ramazan (Şeker) Bayramı Arefesi&quot;, cHolidayType_Half)
242cdf0e10cSrcweir	&apos; End of Ramadan
243cdf0e10cSrcweir	AddFollowUpHolidays(lRamazanBayRamStartDate, 3, &quot;Ramazan (Şeker) Bayramı&quot;, cHolidayType_Full)
244cdf0e10cSrcweirEnd Sub
245cdf0e10cSrcweir
246cdf0e10cSrcweir
247cdf0e10cSrcweirSub FindWholeYearHolidays_GREEK(ByVal YearInt as Integer)
248cdf0e10cSrcweirDim lDate as Long
249cdf0e10cSrcweir	&apos; New Year
250cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Πρωτοχρονιά&quot;, cHolidayType_Full)
251cdf0e10cSrcweir	&apos;Schol Holiday
252cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 30), &quot;Τριών Ιεραρχών&quot;, cHolidayType_Full)
253cdf0e10cSrcweir	&apos; This is both a National Holiday and a religious holiday
254cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 25), &quot;Εθνική Εορτή Ευαγγελισμός Θεοτόκου&quot;, cHolidayType_Full)
255cdf0e10cSrcweir	&apos; Labor Day
256cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Πρωτομαγιά&quot;, cHolidayType_Full)
257cdf0e10cSrcweir	&apos; Assumption Day
258cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Κοίμηση της Θεοτόκου&quot;, cHolidayType_Full)
259cdf0e10cSrcweir	&apos; National Resistance Day
260cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 28), &quot;Εθνική Εορτή&quot;, cHolidayType_Full)
261cdf0e10cSrcweir	&apos; School Holiday
262cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 17), &quot;Επέτειος του Πολυτεχνείου&quot;, cHolidayType_Full)
263cdf0e10cSrcweir	&apos; Christmas Eve
264cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Παραμονή Χριστουγέννων&quot;, cHolidayType_Full)
265cdf0e10cSrcweir	&apos; Christmas Day
266cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Χριστούγεννα&quot;, cHolidayType_Full)
267cdf0e10cSrcweir	&apos; Boxing Day
268cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Δεύτερη μέρα Χριστουγέννων&quot;, cHolidayType_Full)
269cdf0e10cSrcweir	lDate = CalOrthodoxEasterTable(YearInt)
270cdf0e10cSrcweir	&apos; Triodon
271cdf0e10cSrcweir	CalInsertBankholiday(lDate-70, &quot;Αρχή Τριωδίου&quot;, cHolidayType_Full)
272cdf0e10cSrcweir 	&apos; Meat Fare
273cdf0e10cSrcweir	CalInsertBankholiday(lDate-56, &quot;Τσικνοπέμπτη&quot;, cHolidayType_Full)
274cdf0e10cSrcweir	&apos; First Day of Lent
275cdf0e10cSrcweir	CalInsertBankholiday(lDate-48, &quot;Καθαρή Δευτέρα&quot;, cHolidayType_Full)
276cdf0e10cSrcweir	&apos; Saturday of Lazarus
277cdf0e10cSrcweir	CalInsertBankholiday(lDate-8, &quot;Σάββατο του Λαζάρου&quot;, cHolidayType_Full)
278cdf0e10cSrcweir	&apos; Palm Sunday
279cdf0e10cSrcweir	CalInsertBankholiday(lDate-7, &quot;Κυριακή των Βαΐων&quot;, cHolidayType_Full)
280cdf0e10cSrcweir	&apos; Monday before Easter
281cdf0e10cSrcweir	CalInsertBankholiday(lDate-6, &quot;Μεγάλη Δευτέρα&quot;, cHolidayType_Full)
282cdf0e10cSrcweir	&apos; Tuesday before Easter
283cdf0e10cSrcweir	CalInsertBankholiday(lDate-5, &quot;Μεγάλη Τρίτη&quot;, cHolidayType_Full)
284cdf0e10cSrcweir	&apos; Wednesday before Easter
285cdf0e10cSrcweir	CalInsertBankholiday(lDate-4, &quot;Μεγάλη Τετάρτη&quot;, cHolidayType_Full)
286cdf0e10cSrcweir	&apos; Thursday before Easter
287cdf0e10cSrcweir	CalInsertBankholiday(lDate-3, &quot;Μεγάλη Πέμπτη&quot;, cHolidayType_Full)
288cdf0e10cSrcweir	&apos; Good Friday
289cdf0e10cSrcweir	CalInsertBankholiday(lDate-2, &quot;Μεγάλη Παρασκευή&quot;, cHolidayType_Full)
290cdf0e10cSrcweir	&apos; Saturday before Easter
291cdf0e10cSrcweir	CalInsertBankholiday(lDate-1, &quot;Μεγάλο Σάββατο&quot;, cHolidayType_Full)
292cdf0e10cSrcweir	&apos; Easter Monday
293cdf0e10cSrcweir	CalInsertBankholiday(lDate+1, &quot;Δευτέρα του Πάσχα&quot;, cHolidayType_Full)
294cdf0e10cSrcweir	&apos; Pentecost
295cdf0e10cSrcweir	CalInsertBankholiday(lDate+49, &quot;Κυριακή της Πεντηκοστής&quot;, cHolidayType_Full)
296cdf0e10cSrcweir	&apos; Ascension Day
297cdf0e10cSrcweir	CalInsertBankholiday(lDate+39, &quot;Του Αγίου Πνεύματος&quot;, cHolidayType_Full)
298cdf0e10cSrcweir	&apos; All Saints Day
299cdf0e10cSrcweir	CalInsertBankholiday(lDate+56, &quot;Των Αγίων Πάντων&quot;, cHolidayType_Full)
300cdf0e10cSrcweirEnd Sub
301cdf0e10cSrcweir
302cdf0e10cSrcweir
303cdf0e10cSrcweir
304cdf0e10cSrcweirSub FindWholeYearHolidays_SPAIN(ByVal YearInt as Integer)
305cdf0e10cSrcweirDim lDate&amp;
306cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Año Nuevo&quot;, cHolidayType_Full)
307cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Reyes&quot;, cHolidayType_Full)
308cdf0e10cSrcweir	lDate = CalEasterTable(YearInt)
309cdf0e10cSrcweir	CalInsertBankholiday(lDate-2, &quot;Viernes Santo&quot;, cHolidayType_Full)
310cdf0e10cSrcweir	CalInsertBankholiday(lDate+1, &quot;Lunes de Pascua Florida&quot;, cHolidayType_Full)
311cdf0e10cSrcweir	CalInsertBankholiday(lDate+39, &quot;Día de la Ascensión&quot;, cHolidayType_Full)
312cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Fiesta del Trabajo&quot;, cHolidayType_Full)
313cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Día de la Asunción&quot;, cHolidayType_Full)
314cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 12), &quot;Fiesta de la Hispanidad&quot;, cHolidayType_Full)
315cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Todos los Santos&quot;, cHolidayType_Full)
316cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 6), &quot;Día de la Constitución&quot;, cHolidayType_Full)
317cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;La Inmaculada&quot;, cHolidayType_Full)
318cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Navidad&quot;, cHolidayType_Full)
319cdf0e10cSrcweirEnd Sub
320cdf0e10cSrcweir
321cdf0e10cSrcweir
322cdf0e10cSrcweirSub FindWholeYearHolidays_PORT(ByVal YearInt as Integer)
323cdf0e10cSrcweirDim lDate&amp;
324cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Ano Novo&quot;, cHolidayType_Full)
325cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Reis Magos&quot;, cHolidayType_Half)
326cdf0e10cSrcweir	lDate = CalEasterTable(YearInt)
327cdf0e10cSrcweir	CalInsertBankholiday(lDate-47, &quot;Carnaval&quot;, cHolidayType_Full)
328cdf0e10cSrcweir	CalInsertBankholiday(lDate-7, &quot;Domingo de Ramos&quot;, cHolidayType_Half)
329cdf0e10cSrcweir	CalInsertBankholiday(lDate-2, &quot;Sexta-feira Santa&quot;, cHolidayType_Full)
330cdf0e10cSrcweir	CalInsertBankholiday(lDate, &quot;Páscoa&quot;, cHolidayType_Full)
331cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 25), &quot;25 de Abril&quot;, cHolidayType_Full)
332cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Dia do Trabalhador&quot;, cHolidayType_Full)
333cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 29), &quot;Corpo de Deus&quot;, cHolidayType_Full)
334cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 10), &quot;Dia de Camões e das Comunidades Portuguesas&quot;, cHolidayType_Full)
335cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 24), &quot;S. João&quot;, cHolidayType_Full)
336cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 29), &quot;S. Pedro&quot;, cHolidayType_Full)
337cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Assunção de Nossa Senhora&quot;, cHolidayType_Full)
338cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 5), &quot;Implantação da República&quot;, cHolidayType_Full)
339cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Dia de Todos os Santos&quot;, cHolidayType_Full)
340cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 8), &quot;Imaculada Conceição&quot;, cHolidayType_Full)
341cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Natal&quot;, cHolidayType_Full)
342cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 1), &quot;Restauração da Independência&quot;, cHolidayType_Full)
343cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Passagem de Ano&quot;, cHolidayType_Half)
344cdf0e10cSrcweirEnd Sub
345cdf0e10cSrcweir
346cdf0e10cSrcweir
347cdf0e10cSrcweirSub FindWholeYearHolidays_NL(ByVal YearInt as Integer)
348cdf0e10cSrcweirDim lDate&amp;
349cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nieuwjaarsdag&quot;, cHolidayType_Full)
350cdf0e10cSrcweir	lDate = CalEasterTable(YearInt)
351cdf0e10cSrcweir	CalInsertBankholiday(lDate, &quot;1e Paasdag&quot;, cHolidayType_Full)
352cdf0e10cSrcweir	CalInsertBankholiday(lDate + 1, &quot;2e Paasdag&quot;, cHolidayType_Full)
353cdf0e10cSrcweir	CalInsertBankholiday(lDate + 39, &quot;Hemelvaartsdag&quot;, cHolidayType_Full)
354cdf0e10cSrcweir	CalInsertBankholiday(lDate + 49, &quot;1e Pinksterdag&quot;, cHolidayType_Full)
355cdf0e10cSrcweir	CalInsertBankholiday(lDate + 50, &quot;2e Pinksterdag&quot;, cHolidayType_Full)
356cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 30), &quot;Koninginnedag&quot;, cHolidayType_Full)
357cdf0e10cSrcweir	&apos; Bevrijdingsdag is celebrated every 5th year
358cdf0e10cSrcweir	If YearInt Mod 5 = 0 then
359cdf0e10cSrcweir		CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;Bevrijdingsdag&quot;, cHolidayType_Full)
360cdf0e10cSrcweir	End if
361cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 6), &quot;Sinterklaas&quot;, cHolidayType_Half)
362cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;1e Kerstdag&quot;, cHolidayType_Full)
363cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;2e Kerstdag&quot;, cHolidayType_Full)
364cdf0e10cSrcweirEnd Sub
365cdf0e10cSrcweir
366cdf0e10cSrcweir
367cdf0e10cSrcweirSub FindWholeYearHolidays_PL (ByVal YearInt as Integer)
368cdf0e10cSrcweir	Dim lDate&amp;, OsternDate&amp;
369cdf0e10cSrcweir	&apos; New Year
370cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nowy Rok&quot;, cHolidayType_Full)
371cdf0e10cSrcweir	&apos; &quot;the three Magi&quot;
372cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 6), &quot;Trzech Króli&quot;, cHolidayType_Half)
373cdf0e10cSrcweir	&apos; &quot;Womens&apos; Day&quot;
374cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;Dzień Kobiet&quot;, cHolidayType_Half)
375cdf0e10cSrcweir	OsternDate = CalEasterTable(YearInt)
376cdf0e10cSrcweir	CalInsertBankholiday(OsternDate-2, &quot;Wielki Piątek&quot;, cHolidayType_Full)
377cdf0e10cSrcweir	CalInsertBankholiday(OsternDate, &quot;Wielka Niedziela&quot;, cHolidayType_Full)
378cdf0e10cSrcweir	CalInsertBankholiday(OsternDate+1, &quot;Lany Poniedziałek&quot;, cHolidayType_Full)
379cdf0e10cSrcweir	&apos; Ascension Day
380cdf0e10cSrcweir	CalInsertBankholiday(OsternDate+39, &quot;Wniebowstąpienie&quot;, cHolidayType_Full)
381cdf0e10cSrcweir	&apos; Pentecost
382cdf0e10cSrcweir	CalInsertBankholiday(OsternDate+49, &quot;Zielone Świątki&quot;, cHolidayType_Full)
383cdf0e10cSrcweir	&apos; Feast of Corpus Christi
384cdf0e10cSrcweir	CalInsertBankholiday(OsternDate+60, &quot;Boże Ciało&quot;, cHolidayType_Full)
385cdf0e10cSrcweir	&apos; First of May
386cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Święto pracy&quot;, cHolidayType_Full)
387cdf0e10cSrcweir	&apos; Memorial day of constitution
388cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 3), &quot;Dzień konstytucji 3-go maja&quot;, cHolidayType_Full)
389cdf0e10cSrcweir	&apos; &quot;Childrens&apos; day&quot;
390cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 1), &quot;Dzień Dziecka&quot;, cHolidayType_Half)
391cdf0e10cSrcweir	&apos; &quot;Ascension Day&quot;
392cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 15), &quot;Matki Boskiej Zielnej&quot;, cHolidayType_Half)
393cdf0e10cSrcweir	&apos; &quot;All Saints&apos; Day &quot;
394cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 1), &quot;Wszystkich Świętych&quot;, cHolidayType_Full)
395cdf0e10cSrcweir	&apos; National day&quot;
396cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Dzień Niepodległości&quot;, cHolidayType_Full)
397cdf0e10cSrcweir	&apos; Christmas Eve
398cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Wigilia&quot;, cHolidayType_Half)
399cdf0e10cSrcweir	&apos; Christmas
400cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Boże Narodzenie&quot;, cHolidayType_Full)
401cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 26), &quot;Boże Narodzenie&quot;, cHolidayType_Full)
402cdf0e10cSrcweir	&apos; &quot;New Year&apos;s eve&quot;
403cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;Sylwester&quot;, cHolidayType_Half)
404cdf0e10cSrcweirEnd Sub
405cdf0e10cSrcweir
406cdf0e10cSrcweir
407cdf0e10cSrcweirSub FindWholeYearHolidays_RU (ByVal YearInt as Integer)
408cdf0e10cSrcweirDim lDate&amp;
409cdf0e10cSrcweir	&apos; New Year
410cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Новый Год&quot;, cHolidayType_Full)
411cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 2), &quot;Новый Год&quot;, cHolidayType_Full)
412cdf0e10cSrcweir	&apos; Russian Christmas&quot;
413cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 7), &quot;Рождество&quot;, cHolidayType_Full)
414cdf0e10cSrcweir	&apos;Day of Defender of Motherland
415cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 2, 23), &quot;День Защитника Отечества&quot;, cHolidayType_Full)
416cdf0e10cSrcweir	&apos; Woman Day
417cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;Международный Женский День&quot;, cHolidayType_Full)
418cdf0e10cSrcweir	&apos; Spring and labor holiday
419cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;Праздник Весны и Труда&quot;, cHolidayType_Full)
420cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 2), &quot;Праздник Весны и Труда&quot;, cHolidayType_Full)
421cdf0e10cSrcweir	&apos; Victory of the second World War
422cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 9), &quot;День Победы&quot;, cHolidayType_Full)
423cdf0e10cSrcweir	&apos; Independence Day
424cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 12), &quot;День Независимости&quot;, cHolidayType_Full)
425cdf0e10cSrcweir	&apos; Day of Accord and Conciliation
426cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 7), &quot;День Согласия и Примирения&quot;, cHolidayType_Full)
427cdf0e10cSrcweir	&apos; Constitution Day
428cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 12), &quot;День Конституции&quot;, cHolidayType_Full)
429cdf0e10cSrcweirEnd Sub
430cdf0e10cSrcweir
431cdf0e10cSrcweir
432cdf0e10cSrcweirSub FindWholeYearHolidays_US(ByVal YearInt as Integer)
433cdf0e10cSrcweirDim lDate as Long
434cdf0e10cSrcweirDim lFirstNov as Long
435cdf0e10cSrcweirDim lElectDate as Long
436cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;New Year&apos;s Day&quot;, cHolidayType_Full)
437cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 2, 2), &quot;Groundhog Day&quot;, cHolidayType_Half)
438cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 2, 14), &quot;Valentine&apos;s Day&quot;, cHolidayType_Half)
439cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 17), &quot;St Patrick&apos;s Day&quot;, cHolidayType_Half)
440cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 1), &quot;April Fools&apos; Day&quot;, cHolidayType_Half)
441cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 22), &quot;Earth Day&quot;, cHolidayType_Half)
442cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 6), &quot;Nurses&apos; Day&quot;, cHolidayType_Half)
443cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 14), &quot;Flag Day&quot;, cHolidayType_Half)
444cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 14), &quot;Army Day&quot;, cHolidayType_Half)
445cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 19), &quot;Juneteenth(Liberation of Slaves)&quot;, cHolidayType_Half)
446cdf0e10cSrcweir
447cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 7, 4), &quot;Independence Day&quot;, cHolidayType_Full)
448cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 1), &quot;Air Force Day&quot;, cHolidayType_Half)
449cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 4), &quot;Coast Guard Day&quot;, cHolidayType_Half)
450cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 9, 17), &quot;Citizenship Day or Constitution Day&quot;, cHolidayType_Half)
451cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 16), &quot;Bosses&apos; Day&quot;, cHolidayType_Half)
452cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 26 ), &quot;Mother-in-Law&apos;s Day&quot;, cHolidayType_Half)
453cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 27), &quot;Navy Day&quot;, cHolidayType_Half)
454cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 31), &quot;Halloween&quot;, cHolidayType_Half)
455cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 10), &quot;Marine Corps Day&quot;, cHolidayType_Half)
456cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 11), &quot;Veteran&apos;s Day&quot;, cHolidayType_Full)
457cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 7), &quot;Pearl Harbor Remembrance Day&quot;, cHolidayType_Half)
458cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 24), &quot;Christmas Eve&quot;, cHolidayType_Half)
459cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;Christmas Day&quot;, cHolidayType_Full)
460cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 31), &quot;New Year&apos;s Eve&quot;, cHolidayType_Half)
461cdf0e10cSrcweir
462cdf0e10cSrcweir	CalInsertBankholiday(CalEasterTable(YearInt), &quot;Easter Sunday&quot;, cHolidayType_Half)
463cdf0e10cSrcweir
464cdf0e10cSrcweir	&apos; Inauguration Day occurs every 4 years (1997, 2001) in the year following the presidential election
465cdf0e10cSrcweir	&apos; always on the 20th of January unless this is a Sunday in which case on Monday 21st January
466cdf0e10cSrcweir	If YearInt Mod 4 = 1 Then
467cdf0e10cSrcweir		lDate = DateSerial(YearInt, 1, 20)
468cdf0e10cSrcweir		If WeekDay(lDate) = 1 Then
469cdf0e10cSrcweir			CalInsertBankholiday(lDate + 1, &quot;Inauguration Day&quot;, cHolidayType_Half)
470cdf0e10cSrcweir		Else
471cdf0e10cSrcweir			CalInsertBankholiday(lDate, &quot;Inauguration Day&quot;, cHolidayType_Half)
472cdf0e10cSrcweir		End If
473cdf0e10cSrcweir	End If
474cdf0e10cSrcweir	&apos; First Tuesday in November, but only after the 1st of November and only on evenly numbered years
475cdf0e10cSrcweir	If YearInt Mod 2 = 0 Then
476cdf0e10cSrcweir		lFirstNov = DateSerial(YearInt, 11, 1)
477cdf0e10cSrcweir		lElectDate = GetMonthDate(YearInt, 11, 3, 0)
478cdf0e10cSrcweir		If lElectDate &gt; lFirstNov Then
479cdf0e10cSrcweir			CalInsertBankholiday(lElectDate, &quot;Election Day&quot;, cHolidayType_Half)
480cdf0e10cSrcweir		Else
481cdf0e10cSrcweir			CalInsertBankholiday(lElectDate + 7, &quot;Election Day&quot;, cHolidayType_Half)
482cdf0e10cSrcweir		End If
483cdf0e10cSrcweir	End If
484cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 14), &quot;Martin Luther King Jr Day&quot;, cHolidayType_Full)
485cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 2, 2, 14), &quot;President&apos;s Day&quot;, cHolidayType_Full)
486cdf0e10cSrcweir	&apos;	Mothers Day : 2nd Sunday in May, Full
487cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), &quot;Mother&apos;s Day&quot;, cHolidayType_Full)
488cdf0e10cSrcweir
489cdf0e10cSrcweir	&apos; Wednesday of the last full week of April Administrative Professionals&apos; Day (formerly Secretaries&apos; Day)
490cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, -7)-3, &quot;Administrative Professionals&apos; Day&quot;, cHolidayType_Half)
491cdf0e10cSrcweir
492cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 5, 5, 0), &quot;National Day of Prayer&quot;, cHolidayType_Half)
493cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, 14), &quot;Armed Forces Day&quot;, cHolidayType_Half)
494cdf0e10cSrcweir	&apos;	Fathers Day : 3rd Sunday in June
495cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), &quot;Father&apos;s Day&quot;, cHolidayType_Half)
496cdf0e10cSrcweir
497cdf0e10cSrcweir	&apos;	Last Monday in May: Menorial Day, Full
498cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 6, 2, 0)-7, &quot;Memorial Day&quot;, cHolidayType_Full)
499cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 7, 1, 21), &quot;Parents&apos; Day&quot;, cHolidayType_Half)
500cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 8, 1, 0), &quot;Friendship Day&quot;, cHolidayType_Half)
501cdf0e10cSrcweir
502cdf0e10cSrcweir	&apos;	1st Monday in Sep : Labor Day, Full
503cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0), &quot;Labor Day&quot;, cHolidayType_Full)
504cdf0e10cSrcweir	&apos; Sunday after Labor Day Grandparents&apos; Day
505cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0)+6, &quot;Grandparents&apos; Day&quot;, cHolidayType_Half)
506cdf0e10cSrcweir
507cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 10, 1, 0), &quot;National Children&apos;s Day&quot;, cHolidayType_Half)
508cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), &quot;Columbus Day&quot;, cHolidayType_Full)
509cdf0e10cSrcweir	&apos; Sweetest Day: Third Saturday in October
510cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 10, 7, 14), &quot;Sweetest Day&quot;, cHolidayType_Half)
511cdf0e10cSrcweir	&apos;	4th Thu	in Nov : Thanksgiving, Full
512cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 11, 5, 21), &quot;Thanksgiving&quot;, cHolidayType_Full)
513cdf0e10cSrcweirEnd Sub
514cdf0e10cSrcweir
515cdf0e10cSrcweir
516cdf0e10cSrcweirSub FindWholeYearHolidays_JP(ByVal YearInt as Integer)
517cdf0e10cSrcweirDim lDate&amp;
518cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元日&quot;, cHolidayType_Full)
519cdf0e10cSrcweir	&apos; 2nd Monday in January
520cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 7), &quot;成人の日&quot;, cHolidayType_Full)
521cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 2, 11), &quot;建国記念の日&quot;, cHolidayType_Full)
522cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 20), &quot;春分の日&quot;, cHolidayType_Full)
523cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 29), &quot;みどりの日&quot;, cHolidayType_Full)
524cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 3), &quot;憲法記念日&quot;, cHolidayType_Full)
525cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 4), &quot;国民の休日&quot;, cHolidayType_Full)
526cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 5), &quot;こどもの日&quot;, cHolidayType_Full)
527cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 9, 23), &quot;秋分の日&quot;, cHolidayType_Full)
528cdf0e10cSrcweir	CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), &quot;体育の日&quot;, cHolidayType_Full)
529cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 3), &quot;文化の日&quot;, cHolidayType_Full)
530cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 11, 23), &quot;勤労感謝の日&quot;, cHolidayType_Full)
531cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 23), &quot;天皇誕生日&quot;, cHolidayType_Full)
532cdf0e10cSrcweir	If YearInt &gt; 2002 Then
533cdf0e10cSrcweir		CalInsertBankholiday(GetMonthDate(YearInt, 7, 2, 14), &quot;海の日&quot;, cHolidayType_Full)
534cdf0e10cSrcweir		CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 14), &quot;敬老の日&quot;, cHolidayType_Full)
535cdf0e10cSrcweir	Else
536cdf0e10cSrcweir		CalInsertBankholiday(DateSerial(YearInt, 7, 20), &quot;海の日&quot;, cHolidayType_Full)
537cdf0e10cSrcweir		CalInsertBankholiday(DateSerial(YearInt, 9, 15), &quot;敬老の日&quot;, cHolidayType_Full)
538cdf0e10cSrcweir	End If
539cdf0e10cSrcweirEnd Sub
540cdf0e10cSrcweir
541cdf0e10cSrcweir
542cdf0e10cSrcweirSub FindWholeYearHolidays_TW(YearInt as Integer)
543cdf0e10cSrcweir	CalculateChineseNewYear(YearInt)
544cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元旦&quot;, cHolidayType_Full)
545cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 2, 28), &quot;和平紀念日&quot;, cHolidayType_Full)
546cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;婦女節&quot;, cHolidayType_Half)
547cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 29), &quot;革命先烈紀念日(青年節)&quot;, cHolidayType_Half)
548cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 4), &quot;兒童節&quot;, cHolidayType_Half)
549cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 5), &quot;民族掃墓節&quot;, cHolidayType_Full)
550cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;勞動節&quot;, cHolidayType_Full)
551cdf0e10cSrcweir	CalInsertBankholiday(GetNextWeekDay(YearInt, 5, 19, 2), &quot;佛陀誕辰紀念日&quot;, cHolidayType_Full) &apos; Just like Columbus Day
552cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 15), &quot;端午節&quot;, cHolidayType_Full)
553cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 9, 3), &quot;軍人節&quot;, cHolidayType_Half)
554cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 9, 21), &quot;中秋節&quot;, cHolidayType_Full)
555cdf0e10cSrcweir	CalInsertBankholiday(GetNextWeekDay(YearInt, 9, 28, 2), &quot;孔子誕辰紀念日(教師節)&quot;, cHolidayType_Full) &apos; Just like Columnbusday
556cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 10), &quot;國慶日&quot;, cHolidayType_Full)
557cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 25), &quot;臺灣光復節&quot;, cHolidayType_Half)
558cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 31), &quot;先總統  蔣公誕辰紀念日&quot;, cHolidayType_Half)
559cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 11), &quot;國父誕辰紀念日(中華文化復興節)&quot;, cHolidayType_Half)
560cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 12, 25), &quot;行憲紀念日&quot;, cHolidayType_Half)
561cdf0e10cSrcweirEnd Sub
562cdf0e10cSrcweir
563cdf0e10cSrcweir
564cdf0e10cSrcweirSub FindWholeYearHolidays_CN(YearInt as Integer)
565cdf0e10cSrcweir	CalculateChineseNewYear(YearInt)
566cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元旦&quot;, cHolidayType_Full)			&apos; New Year
567cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;妇女节&quot;, cHolidayType_Half)           &apos; Women&apos;s Day
568cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 4, 5), &quot;清明节&quot;, cHolidayType_Half)			&apos; Day of the deads
569cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;劳动节&quot;, cHolidayType_Full)			&apos; International Labour Day
570cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 6, 1), &quot;儿童节&quot;, cHolidayType_Half)			&apos; Children&apos;s Day
571cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 8, 1), &quot;建军节&quot;, cHolidayType_Half)			&apos; Foundation of military
572cdf0e10cSrcweir	CalInsertBankholiday(DateSerial(YearInt, 10, 1), &quot;国庆节&quot;, cHolidayType_Full)			&apos; National festival day
573cdf0e10cSrcweirEnd Sub
574cdf0e10cSrcweir
575cdf0e10cSrcweir
576cdf0e10cSrcweir&apos; Unfortunately I could not find a Routine to convert a &apos;Moon Date&apos; into a gregorian date
577cdf0e10cSrcweirSub CalculateChineseNewYear(iSelYear as Integer)
578cdf0e10cSrcweirDim lDate as Long
579cdf0e10cSrcweir	Select Case iSelYear
580cdf0e10cSrcweir		Case 1995
581cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 31)
582cdf0e10cSrcweir		Case 1996
583cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 2, 19)
584cdf0e10cSrcweir		Case 1997
585cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 2, 7)
586cdf0e10cSrcweir		Case 1998
587cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 28)
588cdf0e10cSrcweir		Case 1999
589cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 16)
590cdf0e10cSrcweir		Case 2000
591cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 5)
592cdf0e10cSrcweir		Case 2001
593cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 24)
594cdf0e10cSrcweir		Case 2002
595cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 12)
596cdf0e10cSrcweir		Case 2003
597cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 1)
598cdf0e10cSrcweir		Case 2004
599cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 22)
600cdf0e10cSrcweir		Case 2005
601cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 9)
602cdf0e10cSrcweir		Case 2006
603cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 29)
604cdf0e10cSrcweir		Case 2007
605cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 18)
606cdf0e10cSrcweir		Case 2008
607cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 7)
608cdf0e10cSrcweir		Case 2009
609cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 26)
610cdf0e10cSrcweir		Case 2010
611cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 10)
612cdf0e10cSrcweir		Case 2011
613cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 3)
614cdf0e10cSrcweir		Case 2012
615cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 23)
616cdf0e10cSrcweir		Case 2013
617cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 10)
618cdf0e10cSrcweir		Case 2014
619cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 31)
620cdf0e10cSrcweir		Case 2015
621cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 19)
622cdf0e10cSrcweir		Case 2016
623cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 9)
624cdf0e10cSrcweir		Case 2017
625cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 28)
626cdf0e10cSrcweir		Case 2018
627cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 16)
628cdf0e10cSrcweir		Case 2019
629cdf0e10cSrcweir			lDate = DateSerial(iSelYear,2, 5)
630cdf0e10cSrcweir		Case 2020
631cdf0e10cSrcweir			lDate = DateSerial(iSelYear, 1, 25)
632cdf0e10cSrcweir		Case Else
633cdf0e10cSrcweir			Exit Sub
634cdf0e10cSrcweir	End Select
635cdf0e10cSrcweir	Select Case  sCurCountryLocale
636cdf0e10cSrcweir		Case &quot;CN&quot;
637cdf0e10cSrcweir			CalInsertBankholiday(lDate-1, &quot;农历除夕&quot;, cHolidayType_Full)
638cdf0e10cSrcweir			CalInsertBankholiday(lDate, &quot;春节初一&quot;, cHolidayType_Full)
639cdf0e10cSrcweir			CalInsertBankholiday(lDate+1, &quot;春节初二&quot;, cHolidayType_Full)
640cdf0e10cSrcweir			CalInsertBankholiday(lDate+2, &quot;春节初三&quot;, cHolidayType_Full)
641cdf0e10cSrcweir
642cdf0e10cSrcweir		Case Else
643cdf0e10cSrcweir			CalInsertBankholiday(lDate-1, &quot;農曆除夕&quot;, cHolidayType_Full)
644cdf0e10cSrcweir			CalInsertBankholiday(lDate, &quot;春節初一&quot;, cHolidayType_Full)
645cdf0e10cSrcweir			CalInsertBankholiday(lDate+1, &quot;春節初二&quot;, cHolidayType_Full)
646cdf0e10cSrcweir			CalInsertBankholiday(lDate+2, &quot;春節初三&quot;, cHolidayType_Full)
647cdf0e10cSrcweir	End Select
648cdf0e10cSrcweirEnd Sub
649cdf0e10cSrcweir
650cdf0e10cSrcweir
651cdf0e10cSrcweirFunction CalculateJapaneseSpringDay(iSelYear as Integer)
652cdf0e10cSrcweir	If (iSelYear &gt; 1979) And (iSelYear &lt; 2100) Then
653cdf0e10cSrcweir		CalculateJapaneseSpringDay() = Int(20.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
654cdf0e10cSrcweir	End If
655cdf0e10cSrcweirEnd Function
656cdf0e10cSrcweir
657cdf0e10cSrcweir
658cdf0e10cSrcweirFunction CalculateJapaneseAutumnDay(iSelYear as Integer)
659cdf0e10cSrcweir	If (iSelYear &gt; 1979) And (iSelYear &lt; 2100) Then
660cdf0e10cSrcweir		CalculateJapaneseAutumnDay() = Int(23.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4))
661cdf0e10cSrcweir	End If
662*3e02b54dSAndrew RistEnd Function</script:module>
663