is_leap_year Function

public pure function is_leap_year(y)

Return true if the specified year is a leap year.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: y

year

Return Value logical


Called by

proc~~is_leap_year~~CalledByGraph proc~is_leap_year is_leap_year proc~calendar_date_to_et calendar_date_to_et proc~calendar_date_to_et->proc~is_leap_year proc~time_module_test time_module_test proc~time_module_test->proc~calendar_date_to_et

Source Code

    pure logical function is_leap_year(y)
    integer, intent(in) :: y !! year
    is_leap_year = (mod(y, 4) == 0 .and. (mod(y, 100) /= 0 .or. mod(y, 400) == 0))
    end function is_leap_year