function
Library: Date and time functions (OMDATE)
Include: omdate.xin |
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
Argument definitions
YYYYMMDD
format 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
To use ymdhms-julian-day-count
, you must include the following code near the top of your program:
include "omdate.xin"