Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Generate Holidays 2

Status
Not open for further replies.

ArtieChoke

Programmer
Feb 16, 2004
792
US
Hi all. I've created a FAQ that contains two classes that can be used to generate any holiday, including Easter and Jewish holidays. Please check it out! :)

faq222-5185

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
A very helpful post I suspect for many people...

Not useful in and of itself for me (as I'm in the UK), but bits of your code still apply even for us Brits...

Well done.

mmilan
 
Nice, thanks.

p.s. I didn't think anybody ever heard of FT besides me.
"Don't crush that dwarf hand me the pliers!
 
This will come in very handy for me. Thanks.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
I guess you havta be an "old-timer" to know about Firesign Theatre! ;-)

Thanks for the feedback. :)

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
While the calculations are 'interesting' from an academic perspective (even trying to figure out the math and guess at the convolouted thinking that must have gone into eome of the ideas), many (Most?) uses in my experience 'relocate' many of the days for the conveniencs or ( " ,,, ? ... ") so the actual (calculated) dates are often irrelevant.

Also, buried somewhere deeo in the etherworld of WinXXXX is a simple text listing giving the "offical" dates of the various "oficial" holidays as observed (or at least published) in a large number of countries.



MichaelRed


 
The "convoluted thinking" (and is definitely isn't a no-brainer) does support moving holidays, such as the 3rd monday of the month, etc. That's the whole meat of it. A simple program to determine "is 12/25 a holiday" doesn't do a whole lot, I agree.

Note: the easter and jewish holiday stuff is definitely wild and I don't take credit for them. I would hope the rest of the code is reasonably understandable and won't take a major rotation of the head to grok it! :)

I use this logic in my own personal calendar program. The majority of the holidays are the "moved for convenience" type. It's a set it up once and forget it kind of thing, which I like, fur sure.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top