Date functions for the HP Prime

Publicado el por

Date functions for the HP Prime

 

One thing that appears in every financial calculator from HP is date calculations. And when they don’t appear, I tend to program them so that they do; you can see in some instances of this blog that we have ported a DDAYS function to the HP15c.

There is no need to do so in the HP41CL. Even in the absence of the Time Module, it comes with all the functions available - the only thing is that you can’t use the stopwatch and clock functions.

But in the HP Prime, these functions are sorely missing. This is the curious thing of HP - they don’t have a single calculator that has absolutely all features, except perhaps the HP41CL (which is not a 100% HP calculator to start with). You need to choose - or program - the features you want.

I feel quite confident with the old keystroke programming model so as to do the programming myself - or for that matter, modify existing programs to suit the European date format (dd.mmyyyy in our calculators); but I’m not feeling at ease at all when programming either the Prime or its cheaper companion, the HP39gii.

So it was with joy that I have discovered that someone has done that programming. It can be found in hpmuseum, following this link:

http://www.hpmuseum.org/forum/thread–1272-post–19101.html#pid19101

The programming uses the typical method of converting both dates to a Julian number, and then add, subtract of whatever you need to do with them. So the main functions are d2J() and j2d() (guess what are each for?), and the rest are based on them.

Here are the comments of the author, Wolfgang Kühn:

// DTFX is a multi functions program for HP PRIME simulating

// the HP50g’s date functions DDAYS and Date+ (HP Prime = DPLUS).

// In addition there are further functions like JDN, N2J, DOW, CALD, DOE.

// DTFX functions are designed to CALL THEM FROM CAS and HOME ENVIRONMENT,

Comentarios: 0
Más sobre: Date functions, HP prime

Solo los usuarios registrados pueden poner comentarios.
Identificarse y añadir comentario Regístrese ahora