In .NET, is there an easy way to determine State Holidays, such as
Thanksgiving, Memorial day, etc?
Any reference is appreciated.
Nov 20 '05
54 2160
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
Cor wrote: 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
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.
Regards - OHM# On**********@BT Internet.com
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 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.
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
Cor wrote: 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
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# On**********@BT Internet.com
* "One Handed Man [ OHM# ]" <OneHandedMan@& REMOVE&TO%MAIL% MEBTInternet.co m> scripsit: 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...
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Thats what I said, read me post again ! It would ** NOT ( See below ) ** MAKE SENSE to hard code holidays into
the locale. After all, significant events may happen which change public holiday days per state.
OHM
Herfried K. Wagner [MVP] wrote: * "One Handed Man [ OHM# ]" <OneHandedMan@& REMOVE&TO%MAIL% MEBTInternet.co m> scripsit: 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# On**********@BT Internet.com
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
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 "Independen ce 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.
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
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 Leylan wrote: 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 "Independen ce 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# On**********@BT Internet.com
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
"Bob" <bo******@yahoo .com> wrote in message
news:OH******** ******@TK2MSFTN GP12.phx.gbl... In .NET, is there an easy way to determine State Holidays, such as Thanksgiving, Memorial day, etc? Any reference is appreciated. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nils Magnus Englund |
last post by:
Hi!
I have a large table in SQL Server 2000 with a datetime-column 'dt'. I want
to select all rows from that table, excluding days which fall on holidays or
weekends. What is the best way to accomplish this? I considered creating a
new table called "holidays" and then selecting all rows (sort of "where not
in (select * from holidays)") , but I was looking for a better solution
since that implies that I have to populate the "holidays"...
|
by: Bob |
last post by:
In .NET, is there an easy way to determine State Holidays, such as
Thanksgiving, Memorial day, etc?
Any reference is appreciated.
|
by: MLH |
last post by:
http://www.opm.gov/Fedhol/
http://www.opm.gov/Fedhol/2008.asp
Federal law (5 U.S.C. 6103) establishes the following public holidays
for Federal employees. Please note that most Federal employees work
on a Monday through Friday schedule. For these employees, when a
holiday falls on a nonworkday -- Saturday or Sunday -- the holiday
usually is observed on Monday (if the holiday falls on Sunday) or
Friday (if the holiday falls on Saturday)....
|
by: dawson |
last post by:
Hello, we have a travel agent client with two websites, they are
pretty much identical apart from the template (master pages) and a few
copy edits here and there, they are however on seperate domains.
The search functionality, login, register and rest of the code base is
identical.
TravelAgentWebsite1 is for worldwide holidays, and TravelAgentWebsite2
only UK holidays. Now, if a client was to perform a search on
TravelAgentWebsite1,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |