days_in_month Function

public function days_in_month(month, year)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: month
integer, intent(in) :: year

Return Value integer


Calls

proc~~days_in_month~~CallsGraph proc~days_in_month days_in_month proc~is_leap_year is_leap_year proc~days_in_month->proc~is_leap_year

Called by

proc~~days_in_month~~CalledByGraph proc~days_in_month days_in_month proc~management_convert_to_daily management_convert_to_daily proc~management_convert_to_daily->proc~days_in_month proc~management_read_time_series management_read_time_series proc~management_read_time_series->proc~management_convert_to_daily proc~management_read_wu_inout management_read_wu_inout proc~management_read_wu_inout->proc~management_read_time_series proc~management_initialise management_initialise proc~management_initialise->proc~management_read_wu_inout proc~initialise initialise proc~initialise->proc~management_initialise program~swim swim program~swim->proc~initialise

Contents

Source Code


Source Code

  integer function days_in_month(month, year)

    integer, intent(in) :: month, year
    integer, dimension(12) :: ndays, ndays_leap

    days_in_month = 0
    ndays = (/ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/)
    ndays_leap = (/ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/)
    if (is_leap_year(year) ) then
      days_in_month = ndays_leap(month)
    else
      days_in_month = ndays(month)
    end if

  end function days_in_month