State holidays

B

Bob

In .NET, is there an easy way to determine State Holidays, such as
Thanksgiving, Memorial day, etc?
Any reference is appreciated.
 
O

One Handed Man [ OHM# ]

Roll your own class. The state holidays will be available on the web. Or use
google, there are lots of examples. It depends on how it will fit within
what you are trying to do.


Regards - OHM#




--------------------------
In .NET, is there an easy way to determine State Holidays, such as
Thanksgiving, Memorial day, etc?
Any reference is appreciated.

Regards - OHM# (e-mail address removed)
 
C

CJ Taylor

Speaking of state holidays...

Don't you find it funny that every religious holiday is in December?

Why is Dec 25 the only date that is really given off? What happened to
separation of Church and State? Sure... I know its called a "Winter
Holiday" on Dec 25... but why the 25th? What about the Jewish people? I'm
sure they don't care about dec 25... you know, espeically not believing that
catholic/christian viewpoint of "Jesus is the messiah".

And haven't we had enough of religion yet?
 
H

Herfried K. Wagner [MVP]

* "Bob said:
In .NET, is there an easy way to determine State Holidays, such as
Thanksgiving, Memorial day, etc?
Any reference is appreciated.

The framework doesn't contain a class for doing that, nearly every
country has its own "holidays".

;-)
 
B

Brian Henry

It's because of a majority thing... in college they do it right, give the
whole month off for "winter vacation"... if you where to give holidays off
for every religion we'd never do anything really... it's kind of a
concession... give everyone a day off no matter the religion where the
majority stands... if you want the other days off also, you can request them
as religious holidays and they can't legally dock you for time or anything
in the USA at least...
 
C

Cor

Hi Herfried,

I was thinking this also, but than by thinking again, in .Net you have
regional settings, so I think this question is totaly normal. I think it
would be a nice addition to the framework from Net.

Cor
 
O

One Handed Man [ OHM# ]

It would not make sense to hard code holidays into the locale. After all,
significant events may happen which change public holiday days per state.

OHM#
Hi Herfried,

I was thinking this also, but than by thinking again, in .Net you
have regional settings, so I think this question is totaly normal. I
think it would be a nice addition to the framework from Net.

Cor

Regards - OHM# (e-mail address removed)
 
C

Cor

Hi OHM

This is not so different with the summertime zones.

You know Brittain had long time a different time for that than the rest of
Europe I thought now it is equal (of course with the normal 1 hour
difference), I am not totaly sure for this.

Cpr
 
O

One Handed Man [ OHM# ]

Hi Cor,

It's very different from Summer Winter times. For example. Last year a
special jubilee day(s) were decided , this is not a normal holiday day(s) or
the UK. Similarly, if a catastrophic event was to occur like 9/11. Then some
countries may decide to make that day a public holiday.

Regards - OHM
Hi OHM

This is not so different with the summertime zones.

You know Brittain had long time a different time for that than the
rest of Europe I thought now it is equal (of course with the normal 1
hour difference), I am not totaly sure for this.

Cpr

Regards - OHM# (e-mail address removed)
 
C

Cor

Hi OHM,

I am talking about the normal public holidays I think then for my country
about

Christian Easter (second and first day)
Christmas (second and first day)
Whitsun (second and first day)
Ascension day
Newyears day

There are only one other that is queensday but that is like newyear always
on the same day.

Cor
 
O

One Handed Man [ OHM# ]

Maybe we could write a generic class something similar to this . . . . You
could then inherit this in a wrapper and load your locale dates in.

Regards - OHM#

Class cHDate

' Member for Date
' Member for Description
' Member for Day

End Class


Class cHollidays

Private Hols() as HDate

Public Sub New( .....

Public Function getDates( .....

Public IsHoliday( . . . .

Public AddDate(.....

Public RemoveDate(....

End Class
Hi OHM,

I am talking about the normal public holidays I think then for my
country about

Christian Easter (second and first day)
Christmas (second and first day)
Whitsun (second and first day)
Ascension day
Newyears day

There are only one other that is queensday but that is like newyear
always on the same day.

Cor

Regards - OHM# (e-mail address removed)
 
H

Herfried K. Wagner [MVP]

* "One Handed Man said:
It would not make sense to hard code holidays into the locale. After all,
significant events may happen which change public holiday days per state.

You will have to hardcode them in the operating system for the next
1,000 years. IMO that's not a good idea...
 
O

One Handed Man [ OHM# ]

Thats what I said, read me post again !

OHM

* "One Handed Man [ OHM# ]"
It would not make sense to hard code holidays into the locale. After
all, significant events may happen which change public holiday days
per state.

You will have to hardcode them in the operating system for the next
1,000 years. IMO that's not a good idea...

Regards - OHM# (e-mail address removed)
 
C

Cor

Hi Herfried,
You have to argue with me about that Herfried, not with OHM,

But you lost to much I think the last times.
(Although not all and mostly we agree)
:)
Cor
 
T

Tom Leylan

Cor,

Concepts like "holidays" are virtually meaningless. Given the knowledge
that a particular day in a particular country is a "holiday" what can you
rely on as being a fact that you can use? Meaning, are the banks closed?
Government offices? Do people working get 1.5 times their regular pay rate?
It only means it is a holiday and that in itself means nothing.

If you think it is important then it would probably need to be set up as a
service. You could query an online source that given a date and a country
it could return whether it was a recognized holiday or not. You would have
to calculate the holidays that change days and you would have to know what
year the holiday became effective so that if somebody posts a date in the
past you could check if it was "Independence Day" in the United States (for
instance) in 1601, prior to it being a country.

Given you probably won't have all the information for "every" country you
would have to be able to return "True", "False" and "I don't know" and the
don't know answer will be the reply to the majority of queries. Let's try
one for instance... "Tibet, Jan 16, 1804" so tell me if it was a holiday or
not.
 
C

Cor

Hi Tom,

I started this when I first thought this question from the OP is a
ridiculous question because there are so many regions in the world.

But because .Net has region settings where in is every comma, every winter
and summertime, every type of datestring,etc etc, than this I think is only
a little but good extention.

Cor

ps National, Public holidays
 
O

One Handed Man [ OHM# ]

Even so, a generic Holiday class would be usefull where you could load
custom dates in and have an IsHoliday member function. Lots of applications
use this kind of information. For example, a help desk system might use if
for calculating reponse time and removing weekends and bank holidays etc.

OHM


Tom said:
Cor,

Concepts like "holidays" are virtually meaningless. Given the
knowledge that a particular day in a particular country is a
"holiday" what can you rely on as being a fact that you can use?
Meaning, are the banks closed? Government offices? Do people working
get 1.5 times their regular pay rate? It only means it is a holiday
and that in itself means nothing.

If you think it is important then it would probably need to be set up
as a service. You could query an online source that given a date and
a country it could return whether it was a recognized holiday or not.
You would have to calculate the holidays that change days and you
would have to know what year the holiday became effective so that if
somebody posts a date in the past you could check if it was
"Independence Day" in the United States (for instance) in 1601, prior
to it being a country.

Given you probably won't have all the information for "every" country
you would have to be able to return "True", "False" and "I don't
know" and the don't know answer will be the reply to the majority of
queries. Let's try one for instance... "Tibet, Jan 16, 1804" so
tell me if it was a holiday or not.

Regards - OHM# (e-mail address removed)
 
M

Marc Miller

Bob,

Thanksgiving is always the 4th Thursday in November, Labor Day is always the
1st Monday in September and Memorial Day is always the last Monday in May.

For any others, search past year's calendars for the patterns.

M. Miller
 
H

Herfried K. Wagner [MVP]

* "Cor said:
You have to argue with me about that Herfried, not with OHM,
Sorry...

But you lost to much I think the last times.

Sorry again, I don't understand.
 
H

Herfried K. Wagner [MVP]

* "Tom Leylan said:
Concepts like "holidays" are virtually meaningless. Given the knowledge
that a particular day in a particular country is a "holiday" what can you
rely on as being a fact that you can use? Meaning, are the banks closed?
Government offices? Do people working get 1.5 times their regular pay rate?
It only means it is a holiday and that in itself means nothing.

It would be nice for a calendar application, but, for example in
Austria, there are school holidays, but many schools have their holidays
at different time. It would be nearly impossible to create a list of
holidays which apply to a certain person.
If you think it is important then it would probably need to be set up as a
service. You could query an online source that given a date and a country
it could return whether it was a recognized holiday or not. You would have
to calculate the holidays that change days and you would have to know what
year the holiday became effective so that if somebody posts a date in the
past you could check if it was "Independence Day" in the United States (for
instance) in 1601, prior to it being a country.

ACK. A, for example, web service, would be a good idea. This will help
keeping the list "up to date".
Given you probably won't have all the information for "every" country you
would have to be able to return "True", "False" and "I don't know" and the
don't know answer will be the reply to the majority of queries. Let's try
one for instance... "Tibet, Jan 16, 1804" so tell me if it was a holiday or
not.

;-)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top