1 SUBROUTINE W3FS21
(IDATE
, NMIN
)
2 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
4 C SUBPROGRAM: W3FS21 NUMBER OF MINUTES SINCE JAN 1, 1978
5 C PRGMMR: REJONES ORG: NMC421 DATE: 89-07-17
7 C ABSTRACT: CALCULATES THE NUMBER OF MINUTES SINCE 0000,
10 C PROGRAM HISTORY LOG:
11 C 84-06-21 A. DESMARAIS
12 C 89-07-14 R.E.JONES CONVERT TO CYBER 205 FORTRAN 200,
13 C CHANGE LOGIC SO IT WILL WORK IN
15 C 89-11-02 R.E.JONES CONVERT TO CRAY CFT77 FORTRAN
17 C USAGE: CALL W3FS21 (IDATE, NMIN)
18 C INPUT ARGUMENT LIST:
19 C IDATE - INTEGER SIZE 5 ARRAY CONTAINING YEAR OF CENTURY,
20 C MONTH, DAY, HOUR AND MINUTE. IDATE(1) MAY BE
21 C A TWO DIGIT YEAR OR 4. IF 2 DIGITS AND GE THAN 78
22 C 1900 IS ADDED TO IT. IF LT 78 THEN 2000 IS ADDED
23 C TO IT. IF 4 DIGITS THE SUBROUTINE WILL WORK
24 C CORRECTLY TO THE YEAR 3300 A.D.
26 C OUTPUT ARGUMENT LIST:
27 C NMIN - INTEGER NUMBER OF MINUTES SINCE 1 JANUARY 1978
34 C LANGUAGE: CRAY CFT77 FORTRAN
35 C MACHINE: CRAY Y-MP8/832
43 DATA JDN78
/ 2443510 /
45 C*** IDATE(1) YEAR OF CENTURY
46 C*** IDATE(2) MONTH OF YEAR
47 C*** IDATE(3) DAY OF MONTH
48 C*** IDATE(4) HOUR OF DAY
49 C*** IDATE(5) MINUTE OF HOUR
63 C COMPUTE JULIAN DAY NUMBER FROM YEAR, MONTH, DAY
65 IJDN
= IW3JDN
(IYEAR
,IDATE
(2),IDATE
(3))
67 C SUBTRACT JULIAN DAY NUMBER OF JAN 1,1978 TO GET THE
68 C NUMBER OF DAYS BETWEEN DATES
72 C*** NUMBER OF MINUTES
74 NMIN
= NDAYS
* 1440 + IDATE
(4) * 60 + IDATE
(5)