HP Forums

Full Version: DATE after DAYS algorithm ???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hi, everybody!

I am looking for an algorithm that takes the start date and the number of days and then calculates the date after those days (equivalent to the DATE key on the HP12C but I don't see the algorithm for it in the manual, or to DATE+ in the HP48). I wonder if sometime "HP" publishes her algorithm to calculate the date, by given date and number of days?

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


I dimly recall seeing the formula for assigning a "day number" to any date, either in an HP12C or HP18C manual, although there was a term missing in it!

The problem is then to work it backwards, to get the date from the day number. This is easy enough that I programmed it once for my HP15C, but it's not at hand for me to copy, just now.

Simple formulas for doing this are widely published, and HP has no secrets here! IIRC, Jim Donnelly's "HP48 Handbook (2nd Ed.)" had such a pair of formulas, taken from an astronomy handbook.

A little search on Internet or at a library should turn up what you want.

-[]-