HP3000-L Archives

October 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Craig Fairchild <[log in to unmask]>
Reply To:
Craig Fairchild <[log in to unmask]>
Date:
Fri, 23 Oct 1998 13:59:10 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
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

ATOM RSS1 RSS2