JULCVT

xcall JULCVT, sepdat, juldat, flag

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

Parameters

sepdate  (B,4)  [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, which is as follows:

MAP1 Sepdat,B,4

MAP1 SepdatX,@Sepdat

   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)

 

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.

Comments

The AlphaBASIC 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.