HP Prime Forum
Julian Date function - Printable Version

+- HP Prime Forum (http://forum.hp-prime.de)
+-- Forum: HP Prime (/forumdisplay.php?fid=1)
+--- Forum: Software (/forumdisplay.php?fid=4)
+--- Thread: Julian Date function (/showthread.php?tid=71)



Julian Date function - cdeaglejr - 04-03-2016 08:02 PM

This HP Prime function computes the Julian Date from a user-provided calendar month, day and year.

The function will report October 5, 1582 to October 14, 1582 as an invalid calendar date via a MSGBOX and return.

Please provide all digits of the calendar year.

The calendar day argument can include a "fractional" part. For example day = 5.32784.

The syntax of this function is as follows;

EXPORT JULIAN(month, day, year)

// Julian date

// input

// month = calendar month [1 - 12]
// day = calendar day [1 - 31]
// year = calendar year [yyyy]

// output

// julian date

// special notes

// (1) calendar year must include all digits

// (2) calendar day may include fractional part

// (3) will report October 5, 1582 to October 14, 1582
// as invalid calendar date and return

////////////////////////////////////////////