The Museum of HP Calculators

HP Forum Archive 03

[ Return to Index | Top of Index ]

Date algorithm.
Message #1 Posted by Tal on 11 June 2000, 3:42 a.m.

Hi, everybody!

I wonder if sometime "hp" publishes her algorithm to calculate the date, by given date and number of days?

Any other algorithm appreciated also.

Best regards, Tal email: td@chem.ch.huji.ac.il

      
Re: Date algorithm.
Message #2 Posted by Thibaut on 11 June 2000, 4:20 a.m.,
in response to message #1 by Tal

As far as I know, that means up to the 41 series, HP always published their formulas agorithm. I remember I saw the date calculation algorithm on the manual of the HP 1C ans on an application pac for the 34C.

I'll try to find it for you.

Best regards,

Thibaut

      
Re: Date algorithm.
Message #3 Posted by Andrés C. Rodríguez on 11 June 2000, 7:25 a.m.,
in response to message #1 by Tal

For a simple version, see the HP25 Applications Manual; and for a more elaborated version, the HP41 Standard Pac manual (it comes with the calculator, the ROM module was an option).

      
Re: Date algorithm.
Message #4 Posted by Katie on 14 June 2000, 12:14 a.m.,
in response to message #1 by Tal

It's also in the 12C manual, appendix D. I've "borrowed" it a couple of times to stick in various programs that I've built over the years because it's so simple and easy to implement.

here it is:

delta-days = f(d1)-f(d2)

dn = 365(yyyy) + 31(mm-1) + dd + INT(z/4) - x where :

if mm<=2 x=0; z=(yyyy)-1

else x=INT(0.4mm + 2.3); z=(yyyy)


[ Return to Index | Top of Index ]

Go back to the main exhibit hall