.TITLE CDATEW .IDENT /V01/ .ENABLE LC ; ; This module forms part of the suite of Date Routines returning the ; current date in one of the following forms, or converting one form to ; another. ; Form I - Day, Month & Year since 1950 as 3 byte values ; Form A - ASCII DD-MMM-YY ; Form D - Integer*2 days since 1st January 1950 ; Form E - Integer*2 encoded date ; Form W - Weekday Number (0 = Sunday) ; ; Author: V01 30-Jun-80 Phil Stephensen-Payne ; ; Calling Sequence: ; ; This subroutine is called via the standard FORTRAN calling sequence as: ; ; CALL CDATEW (ENCDAT,WEKDAY [,STATUS]) ; or ; STATUS = CDATEW (ENCDAT,WEKDAY) ; or ; CALL CDATEW from MACRO-11 (with R5=0) ; ; Where: ; ENCDAT = Binary encoded date (R1 for MACRO calls) ; WEKDAY = Weekday Number (Sunday=0) (R1 for MACRO calls) ; STATUS = Optional error return ; ; Errors returned: ; ; STATUS = 0 if the operation was successful ; = -1 if a parameter error was detected ; = -2 if an invalid input date was specified ; ; External references: ; ; This module calls the subroutines PRMCHK,DISP,GETE,PUTW,CDATED,CDATDW ; ; ; CDATEW:: CALL DISP ; Call the dispatcher .WORD GETE ; Get Type E .WORD CDATED ; Convert to Type D .WORD CDATDW ; Convert that to Type W .WORD PUTW ; And store W .END