Please enable JavaScript to view this site.

Updated September 2017

xcall JULCVT, sepdat, juldat, flag {,status}

JULCVT converts between a separated date format and Julian date format.  

Parameters

sepdate  (Num)  [in/out]

is the date to convert to Julian (if flag = 0), or the return date (if flag = 1). It is in AMOS "separated" format, typically mapped as follows:

MAP1 sepdate,B,4

MAP1 sepdateX,@sepdate

  MAP2 mon,B,1         ! Month (1-12)

  MAP2 day,B,1         ! Day of month (1-31)

  MAP2 yr,B,1          ! Offset from 1900 (2003=103)

  MAP2 dow,B,1         ! Day of week (Mon=0, Sun=6)

 

Note that sepdate can be of any numeric type large enough to hold a 32 bit integer, but you would need to assign it to an overlay as in the map statements above in order to easily split out the individual fields.

juldat  (Num)

is the Julian date equivalent of sepdate (if flag = 0) or the date to convert to separated format (if flag = 1). This is the number of days since "The Beginning" (about 4716 BC).

flag (Num)  [in]

should be set to 0 to convert from sepdate to juldat, else 1 to convert the other way.

status (Num)  [out]

returns 0 in all cases. This is essentially a dummy variable here to match a legacy version of this routine under AMOS.

Comments

The BASIC system variable DATE can be used to set sepdat to the current date (i.e. sepdat = DATE).

See Also

GRECNV and DATES for other date conversion routines.

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software