INTEGER FUNCTION JULIAN( YEAR, MONTH, MDAY ) INTEGER, INTENT(IN ) :: YEAR ! year, integer, YYYY INTEGER, INTENT(IN ) :: MONTH ! month-number 1...12 INTEGER, INTENT(IN ) :: MDAY ! day-of-month 1...31
int julianc( int year , int month , int mday ) ;
NOTE: This is not the Julian date -- only the day-number. To get the Julian date:
JDATE = 1000 * YEAR + JULIAN ( YEAR, MONTH, MDAY )
For Fortran-90 declarations and interface checking:
USE M3UTILIO
See also: subroutines
DAYMON(),as well as EDSS/ Models-3 date-time manipulation programs
ISDSTIME(),
WKDAY(),
MMDDYY(), and
DT2STR()
gregdate and
juldate.
#include "iodecl3.h"
if called from C.
Valid YEAR, MONTH, MDAY
(and after the
Gregorian-calendar transition, which happened 1582 and after—in
1752 in the US).
... INTEGER JULIAN INTEGER JDATE, YEAR ... YEAR = 1988 JDATE = 1000 * YEAR + JULIAN( YEAR, 3, 21 ) !!.... Now JDATE is the Models-3 Julian date for March 21, 1988 ...
... #include "iodecl3.h" ... int jdate, year, month, mday ; ... year = 1999 ; month = 4 ; mday = 1 , jdate = 1000 * year + julianc( year, month, mday ) ; /* Now jdate is the Models-3 Julian date for April Fool's Day, 1999 */ ...
Up: Date-Time Manipulation Routines
To: Models-3/EDSS I/O API: The Help Pages