Forums Register Login

Code to check whether a given date falls on weekend or holidays

+Pie Number of slices to send: Send
Hi,

Can anyone provide a code fragment which will accept a date and check if it falls on weekend or holidays.
If it falls on weekend or holidays then I need to increment that date in order to check again if the new date( incremented) falls on holiday or weekend.

Appriciate yoor help and quick responses.
+Pie Number of slices to send: Send
The Calendar classes will return day of week; I hope that's useful for a start.
+Pie Number of slices to send: Send
As for holidays, you will need to specify what the holidays are. THese are different for each country, and will even be different each year (Easter and such).

If you have such a collection or array of holidays you can compare:
I can't renounce my name. It's on all my stationery! And hinted in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 7404 times.
Similar Threads
Add days, but not weekend days
HAPPY NEW YEAR 2007 !!!
US Holidays Calendar
Code to check whether a given date falls on weekend or holidays
Stumped By HashSet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:35:39.