SUBROUTINE DAYMON( JDATE, MNTH, MDAY ) INTEGER JDATE ! Julian date, format YYYYDDD = 1000*Year + Day INTEGER MNTH ! month (1...12) INTEGER MDAY ! day-of-month (1...28,29,30,31)
daymonc() is a C wrapper calling the Fortran DAYMON()
void daymonc( int jdate , int * month , int * mday )
For Fortran-90 declarations and interface checking:
USE M3UTILIO
See also subroutines ISDSTIME(), JULIAN(), WKDAY(), MMDDYY(), and DT2STR() as well as EDSS/ Models-3 date-time manipulation programs gregdate and juldate.
#include "iodecl3.h"
if called from C.
JDATE must be expressed in terms of Models-3 date and time conventions .
JDATE is an integer coded YYYYDDD = YEAR*1000 + DAY
... USE M3UTILIO ... INTEGER MDAY, MONTH ... CALL DAYMON( 1988021, MONTH, MDAY ) C ==> MONTH and MDAY are now 1 (January) and 21. ...
... #include "iodecl3.h" ... int month, mday ... daymonc( 1988034, &month, &mday ) /* month and mday are now 2 (Feb), and 3 (=34 - 31) */ ...
Up: Date-Time Manipulation Routines
To: Models-3/EDSS I/O API: The Help Pages