INTEGER FUNCTION SECSDIFF( ADATE, ATIME, ZDATE, ZTIME ) INTEGER ADATE, ATIME ! starting date&time INTEGER ZDATE, ZTIME ! ending date&time
int secsdiffc( int adate , int atime , int zdate , int ztime )
For Fortran-90 declarations and interface checking:
USE M3UTILIO
See also SEC2TIME() and TIME2SEC()
#include "iodecl3.h"
for C.
ADATE, ATIME, ZDATE, ZTIME expressed according to Models-3 date and time conventions .
... USE M3UTILIO ... INTEGER SECS ... SECS = SECSDIFF( 1988001, 1, 1989365, 235959 ) C Now SECS is the number of seconds from one second after C midnight on New Year's Day, 1988 until one second before C midnight on New Year's EVE, 1989. Will be 63,071,998. ...
... #include "iodecl3.h" ... int secs ; ... secs = secsdiffc( 1989365, 235959, 1988001, 1 ) ; /* Now secs == -63,071,998 is negative, since this interval goes _backwards_ in time */ ...
Up: Date-Time Manipulation Routines
To: Models-3/EDSS I/O API: The Help Pages