Library: Date and time functions (OMDATE)
Returns: Returns the Julian day of the specified date, with 1 January being day number 1 (one).
define integer function ymdhms-julian-day-count value string ymd
ymdhms-julian-day-count takes a date in
YYYYMMDD format and returns the Julian
day—the number of the day within the year, with 1 January being day number 1 (one). ymd can be
longer and contain a time portion, but the part beyond the date is ignored.
The following example outputs the Julian day of the current date.
include "omdate.xin" process output "Julian day number of today = " || "d" % (ymdhms-julian-day-count now-as-ymdhms) || "%n"The output of this program might be
Julian day number of today = 304
ymdhms-julian-day-count, you must include the following code near the top of your program: