On Oct 23, 4:25pm, Stigers, Greg [And] wrote:
> Subject: Re: Determining The Last Day Of The Month
> I had a lot of help with this from Lars Appel, Jeff Vance, and Tim Ericson,
> so they deserve the credit for me being able to put this together. But
> except for leap months,
> IF HPDATE=![WORD("31 28 31 30 31 30 31 31 30 31 30 31",,HPMONTH)]
> will do it, and for catching leap day,
> IF !HPDATE = 29 AND !HPMONTH = 2 AND !HPYEAR MOD 4 = 0
...
>-- End of excerpt from Stigers, Greg [And]
Note, however, that this algorithm will fail on February 28, 2100 (not a leap
year), assuming that the two conditions above are constructed together to
remove February 28 of each leap year from consideration as the last day of the
month.
Of course, I hear the snickers now... "Yeah, but that's over 100 years from now
- I'll certainly be retired by then! :-)!"
To which I reply, "True, but we're talking HP3000s here. More than likely
they'll still be running!"
--
Craig Fairchild
Email: [log in to unmask] Phone: (408) 447-5990
USPS: Hewlett-Packard Company Fax: (408) 447-4278
M/S 47UA
19447 Pruneridge Avenue
Cupertino, CA 95014
|