home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
ADV350.ZIP
/
datime.for
< prev
next >
Wrap
Text File
|
1990-11-11
|
862b
|
32 lines
SUBROUTINE DATIME(D,T)
C RETURN THE DATE AND TIME IN D AND T. D IS NUMBER OF DAYS SINCE 01-JAN-78,
C T IS MINUTES PAST MIDNIGHT.
IMPLICIT INTEGER*2 (A-Z)
INTEGER*2 X,YEAR
INTEGER*4 D,T
REAL XX,SECNDS
DIMENSION DAT(2),MONTHS(12),HATH(12)
DATA MONTHS/1,2,3,4,5,6,7,8,9,10,11,12/
DATA HATH /31,28,31,30,31,30,31,31,30,31,30,31/
C CALL IDATE(X,ID,YEAR)
C XX=SECNDS(0.)/60.
CALL GETDAT(YEAR,X,ID)
CALL GETTIM(IHR,IMIN,ISEC,I100TH)
XX=60.*IHR+IMIN+(ISEC+I100TH/100.)/60.
D=ID
T=XX
DO 1 MON=1,12
IF(X.EQ.MONTHS(MON)) GOTO 2
1 D=D+HATH(MON)
CALL BUG(28)
C 2 D=D+(YEAR-78)*365+(YEAR-78)/4
2 D=D+(YEAR-1978)*365+(YEAR-1978)/4
IF(MOD(YEAR,4).EQ.0.AND.MON.GT.2) D=D+1
RETURN
END