HP3000-L Archives

December 1998, Week 5

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:
Jeff Vance <[log in to unmask]>
Reply To:
Jeff Vance <[log in to unmask]>
Date:
Wed, 30 Dec 1998 18:48:43 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
On Dec 30,  9:32am, Keven Miller wrote:
> From what I read, your script JULIAN could be appropriately named Dayofyear.

You are correct and I apologize for being sloppy in my naming.  I will change
the version on jazz to be "DOY".

> The other scripts I believe use the ASK/MANMAN julian algorithm which is
> based on Jan 1 1972 (?)
>
> If a new HP var, HPDAYOFYEAR, is provided, then the leapyear checking could
> be avoided.
> But the julian day algorithm may not be widely (globally) accepted.

I wonder about this too, although, if the Julian date is only being used as
an intermediate to do date arithmetic it may not matter.  There seems to
be strong consensus for using the Modified Julian Date (MJD), and that
would be my preference too, if we are to support this data via the CI.

> If a julian algorithm is adopted, these R/W HP vars could be useful then.
>         HPJULIAN                int
>         HPJULIANYEAR            int
>         HPJULIANMONTH   int
>         HPJULIANDAY             int
> With the feature that when any of these are written to (ie: SETVAR
> HPJUL....), all the others are adjusted.
> I could set HPJULIANYEAR, MONTH, DAY, then do calculations with HPJULIAN,
> and then read the final result
> from HPJULIANYEAR, MONTH, DAY.

I think date functions may be more intuitive to use.  Eg. what happens
if the month, day or year was not set before referencing HPJULIAN?  I like
the idea of providing HPJULIAN (probably the MJD) format.  Is there value
too in having HPLEAPYEAR -- a boolean CI read-only variable that indicates if
the current year is a leap year.

Jeff Vance, CSY

--

ATOM RSS1 RSS2