× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





"Al Barsa, Jr." <barsa2@ibm.net> wrote:

>>Secondly I don't think it's realistic to calculate public holidays on the
>>fly;
>>these will have to be stored in a database file.

>National holidays are specified by legislation.

This is one of the keys to the problem. If the legislation changes you have to
go back to the algorithm. It does happen - public holidays have been messed
around with a few times in the UK within my memory. You will also need a
different routine for each country your program is to cover, although of course
this doesn't matter if you know you're only ever dealing with US holidays.

>I published a routine
>(several years ago) called RTVHOLIDAY that calculates the date and day of
>the week for every national holiday, from the years 1600-9999.  The
>holidays included:

This didn't include Easter. I hadn't realised that Easter was not a national
holiday in the US. Easter is a real pain (to calculate) because you have to know
the phases of the moon. I think it may also be different for the Russian
Orthodox and Roman churches.

Note I didn't say it was impossible, I only said it wasn't realistic. The 3
reasons for this are moveable holidays, changes to legislation, and differences
between countries. If you're US only and the holidays are fixed and you're
confident the government won't mess with it very often then you certainly could
do it on the fly.

>There is also a TAA TOOL called RTVHOLIDAY.  It uses a table, and goes from
>1940 to 2039.  The holidays include:

This list did include movable holidays, which I suspect is why it runs from a
table and has a limited range. No doubt Al will correct me if I'm wrong.

Al must have had a lot of fun writing this stuff, but I still think my advice to
Chris was sound. Find out how the company currently plans for public holidays
and work with that function. If the function is not well defined then you've
highlighted an organizational weakness and you can help your company to fix it.

Dave Kahn, ABB Steward Ltd.


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.