ymdhms-julian-day-count

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).


Declaration
define integer function ymdhms-julian-day-count value string ymd

Argument definitions

ymd
a date in "YYYYMMDD" format


Purpose

This function 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). The argument for this function can be longer, but the part beyond the date is ignored.

Example


  include "omdate.xin"
  process
     output "Julian day number of today = "  
        || "d" % (ymdhms-julian-day-count now-as-ymdhms) 
        || "%n"
  ; Result of this code, run on Feb. 19, 2001:
  ;    Julian day number of today = 50