WKDAY() and wkdayc()

Fortran version:

    INTEGER FUNCTION  WKDAY( JDATE )
        INTEGER, INTENT(IN   ) :: JDATE	!  Julian date (YYYYDDD)

C version:

    int wkdayc( int  jdate ) ;

Summary:

WKDAY() returns the day-of week (1=Monday, ..., 7=Sunday) corresponding to the Julian date JDATE using the Zeller's-congruence algorithm.

See also subroutines DAYMON(), JULIAN(), MMDDYY(), and DT2STR() as well as EDSS/ Models-3 date-time manipulation programs gregdate and juldate.

Preconditions:

#include "iodecl3.h" for C declaration, or USE M3UTILIO for Fortran-90 declarations and interface checking.

Fortran Usage:

    ...
    USE M3UTILIO    !!  or:  INTEGER, EXTERNAL :: WKDAY
    ...
    INTEGER   JDATE, IDAY
    ...
    IDAY = WKDAY( 1988001 ) !! Now IDAY is day of the week for Jan. 1, 1988
    ...

C Usage:

    ...
    #include "iodecl3.h"                          
    ...
    int  wday ;
    ...
    wday = wkdayc( 1988001 ) ;
            /*  Now IDAY is day of the week for Jan. 1, 1988  */
    ...


Previous: TIME2SEC

Up: Date-Time Manipulation Routines

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