Return true if the specified year is a leap year.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | y |
year |
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