HP3000-L Archives

November 2000, Week 2

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:
Barry Lake <[log in to unmask]>
Reply To:
Barry Lake <[log in to unmask]>
Date:
Wed, 8 Nov 2000 14:28:04 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (35 lines)
At 2:11 PM -0800 11/8/00, Shawn Gordon wrote:
>At 01:55 PM 11/8/2000, Mark Boyd wrote:
>>Could someone help us with the intrinsic calendar date format?
>>We're trying to rebuild dates from calendar date formats and the year always
>>comes out wrong.
>>
>>Calendar returns today as 4023, when we try to turn that back into today,
>>the year is 2001.
>
>according to my handy dandy Orbit Pocket Guide, bits 0:7 are the years
>since 1900 range 0 to 127 (so 2027 is the end).  Bits 7 to 9 are the day of
>the year.


Shawn probably means "Bits 7 to 15" or "starting with bit 7 for 9 bits".

In any case, he's referring to the 16-bit return value of the CALENDAR
intrinsic. Please note that there is also an HPCALENDAR intrinsic which
returns a 32-bit value:

   0:23  Year since 1900
  23:9   Day of year

Obviously, 24 bits is large enough to accommodate values for the next 16
million years or so, however the HPDATECONVERT intrinsic, which can accept
this 32-bit format as input will only accept years up to 9999 as valid.


Barry Lake                              [log in to unmask]
Allegro Consultants, Inc.               www.allegro.bogus.com
(408)252-2330
--------
Attempting to reduce spam influx.
Remove ".bogus" to create valid address.

ATOM RSS1 RSS2