DAYMON() and daymonc()

Fortran version:

    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)

C version:

daymonc() is a C wrapper calling the Fortran DAYMON()
    void daymonc( int    jdate , 
                  int  * month , 
                  int  * mday )

Summary:

This routine determines the month MNTH (1...12) and day-of-month MDAY (1...31) for the indicated Julian date JDATE (represented as an integer YYYYDDD).

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.

Preconditions:

#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

Fortran Usage:

    ...
    USE M3UTILIO
    ...
    INTEGER  MDAY, MONTH
    ...
    CALL DAYMON( 1988021, MONTH, MDAY )
C	    ==> MONTH and MDAY are now 1 (January) and 21.
    ...
    

C Usage:

    ...
    #include "iodecl3.h"
    ...
    int  month, mday
    ...
    daymonc( 1988034, &month, &mday )
    /*  month and mday are now 2 (Feb), and 3 (=34 - 31)  */
    ...


Previous: CURRSTEP

Next: DT2STR

Up: Date-Time Manipulation Routines

To: Models-3/EDSS I/O API: The Help Pages