HP71B (Ver. 1BBBB) Date Bug?


I often need to know the day of the year in my job. So for fun I decided to write a program for each of my calcs to get this info. Easy enough with a calculator with date support such as a 41C/CV with Time Module or a 41CX or a 48. A little more complex if you don’t have date support. At any rate I had written programs for my 41, 35S, and 42S and had gotten around to taking a look at my 71B.

It took me about 5 minutes from putting in the batteries (I had not played with it in a while) to figure out that this support was built right in. DATE returns YYDDD where YY is the year and DDD is the day of the year. So, no fun here, works right out of the box. I set the correct date and time and keyed in “date” and I got 236 (for 8/23/10)… WOAH! Wrong answer! My 48, 42, 41, and 35 all agree that the correct answer should be 235. I thought about this for a moment and then set the date to 2/28/10. Date = 10059. Ok, all good. Now try 3/01/10. Date = 10061. Uh-Oh. Not so good. It seemed to think that 2010 was a leap year. Ok, so try to ‘setdate “10/02/29”’. Nope, caught that, won’t let it happen. Ok, so ‘setdate 10060’. That works fine. Now try date again. Answer? 10061. Tried the same series of tests for 2011, no problems there. So the calc appears to have a problem with the numeric date routines for 2010 but the setdate routines recognize the fact that 2010 is NOT a leap year just fine. Note that date$ also appears to work correctly in that ‘setdate 10060’ returns the correct string date when DATE$ is used.

I have not bothered to try any other ROM versions which I might get around to a little later as I have a couple more of these beasties.


M. Joury


I'm curious, did you set the year as '2010' or just '10'?


Just 10. Did I miss something in the docs? Mind you, Year 10 can't be a leap year either and all other dates appear correct.

Now you got me thinking. Back to the drawing board.

Although, it would seem that using 'setdate 10060' should handle any issues of string date formatting that may show up in using 'setdate 10/03/01'. And the fact that setdate 10060 results in date returning 10061 would seem to indicate a problem.


M. Joury


This is a known bug of version 1BBBB: "Invalid leap year determination for even year in odd decade". Was occuring in all these 90's years, and now in 2010, 2012 up to 2018. But will work well again in 2020 :-)

Fixed in versions 2CCCC/2CDCC.



Thanks J-F, I was not aware of that. I appreciate the info.

M. Joury


That's actually good news... because now you get to write your program for the HP-71 after all. ;-)


Thanks Bruce,

I hadn't thought of that aspect of it <g>. I was simply messing with ways to correct the odd decade/even year bug. But what the heck, just roll my own!


M. Joury


This is a known bug of version 1BBBB: "Invalid leap year determination for even year in odd decade". Was occuring in all these 90's years, and now in 2010, 2012 up to 2018. But will work well again in 2020 :-)

Fixed in versions 2CCCC/2CDCC.

J-F --

Thanks for the info; did personal modesty preclude you from providing the link to your own fine webpage, where presumably all the known HP-71 bugs are listed? Many users may not know that it moved to a new URL (away from Lycos) since the previous retrieval...

My own HP-71B with 1BBBB ROM exhibited the bug, as might be expected. The bug surprises me, as the leap-year rule is rather straightforward.

-- KS


Here is the example of setdate usage from the manual:

Both these statements set the date to March 7, 1985...


SETDATE "85/03/07"

Of course what you are getting at is 1910 as opposed to 2010. But that is not a leap year either.

I guess I was not seeing the obvious implication of your question in my first response.

Here we go... From the reference manual:

For numeric date inputs and for date string inputs, if you use the two-digit year format, and if:

* 60 <= YY <= 99, then YY = YY + 1900

* 0 <= YY <= 59, then YY = YY + 2000

So I guess the HP71B is Y2K safe <g>.

M. Joury

Edited: 23 Aug 2010, 7:58 p.m.


Yes I thought about that because I had recently resurrected my 71B. The first thing was to set the time and date. Years ago I had written date and time LEX file utilities. I remember how the 71 handled dates and times. Thats why I asked :)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Prime: how to detect date format giancarlo 1 714 12-02-2013, 11:21 AM
Last Post: Michael de Estrada
  Date/time formats R. Pienne 4 1,110 11-01-2013, 12:43 PM
Last Post: Marcus von Cube, Germany
  How to set the Date.Time etc on a WP34S Harold A Climer 4 1,040 10-29-2013, 09:32 PM
Last Post: FORTIN Pascal
  HP71B Spy Radio Crypto Donald Ingram 2 858 10-14-2013, 10:51 AM
Last Post: Eric Smith
  Date/time programs for the HP 35s R. Pienne 0 531 10-03-2013, 02:37 PM
Last Post: R. Pienne
  HP71B to HP 41 Translator ROM Manual Michael Lopez 5 1,085 04-25-2013, 03:51 AM
Last Post: Mike (Stgt)
  Rather large missed opportunity - a pile of HP71B's Chris Smith 3 812 04-19-2013, 07:30 AM
Last Post: Chris Smith
  WP34S ver 3,2 Arrived from Eric Namir 0 466 04-16-2013, 03:30 PM
Last Post: Namir
  Has anyone else had problems with ebay member 'hp71b'? Dan Grelinger 6 1,095 01-26-2013, 09:33 AM
Last Post: aurelio
  Date & Time disappear on WP 34S René Franquinet 16 2,474 12-10-2012, 08:24 AM
Last Post: Walter B

Forum Jump: