U@JULIANTODT

U@JULIANTODT converts a Julian date to a calendar date. The Julian date number is based on the Gregorian start date of October 15, 1582. If the output generated is an invalid date, an error number is returned.

Module CALRTNS

Required Input

Field Type and length Definition
E@DRJULIANDYS N 8 Julian date.

Output

Field Type and length Definition
E@DRFRDATE N 8

Calendar date.

If the input date century equals 00, it changes to 19 or 20. See Century Parameter Processing.

E@DRERRORNBR N 9

Error number.

See Error Number.

E@DRERRORVAR A 20 Input in error. Calculated calendar date in error that was calculated from the Julian date input.

Programming Example

    IF        F1@AGNDYS <> *ZEROS    
     EVAL      E@DRFRDATE     = F1@CTFFDT  
     CALLP     U@DATETOJUL                     Date To Julian
     SUB       F1@AGNDYS     E@DRJULIANDYS             
     CALLP     U@JULIANTODT                    Julian To Date
     EVAL      PAP130#RCNDT   = E@DRFRDATE