Hi there,
I've got a little problem with the German "Feiertage" (public holiday). In
fact I am looking for a little database, program or whatever that simply
answers the question: Is this specific day a "Feiertag" ?
gratefule for any help
.
.
.. KP
## CrossPoint v3.1 ##
What I have done in my application is to create a
table called "Holidays" with one Date-field which
contains the holidays of the next four years and this
field defined as Primary Key. If you want to do so,
here are the following four Easter Sundays:
03/30/97, 04/12/98, 04/04/99, 04/23/00.
The following function checks if a given date falls
on a holiday
Function Holiday (Date As Variant) As Integer
Dim DB As Database
Dim RS As Recordset
Set DB = DBEngine(0)(0)
Set RS = DB.OpenRecordSet("Holidays",DB_OPEN_TABLE)
RS.Index = "PrimaryKey"
RS.Seek "=" , Date
If RS.NoMatch Then
Holiday = TRUE
Else
Holiday = FALSE
End If
End Function
Since I have no access to the application at the moment
I have been typing this from memory. It is very likely
that there are still errors in it. At least it gives
you an idea how you might start. This approach has the
advantage that it enables the end-user to define by
himself which days are holidays and which are not,
simply by adding or deleting dates to rsp. from the
"Holidays" table. (Given the tight economic situation
and the radical budget cuts over here it is very likely
that we will loose one or two holidays within the next
years.)
If you don't want to use a table for this task you can
as well write a function that calculates the date of
Easter Sunday for any given year and then compare the
date in question with the list of holidays above. If
you are interested in such a function there is one in
the Mathematica-Package `Calendar`.
wwwww
g( o o )g
--oOO--(_)---OOo--------------------------------------------
Karl Loibl
Phone: ++49-89-63651406
.ooo0 0ooo. E-Mail: lo...@bloch.zfe.siemens.de
( ) ( ) URL: http://wwwhoppe.math.uni-augsburg.de
----\ (---) /-----------------------------------------------
\_) (_/