public static int TI_DAYM ( int iyear , int imon ) { int iday = 0 ; if ( ( imon > 0 ) && ( imon < 13 ) ) { // Pick the number of days for the given month. iday = month [ imon - 1 ] ; if ( ( imon == 2 ) && LEAP ( iyear ) ) { iday = iday + 1 ; } } return iday ; }
This subroutine returns the number of days in the given month . The year must be a full four - digit year .