Code review. (D Munro problem 2.12)

My two cents to keep straying away from the original post.

New year in Britain was on March 25th, for a while.

@BB_UK also notice that leap year are those which are mod 4 == 0, but those which are mod 400 != 0 are not leap years. 1900 and 2100 are not leap years. I think this is one of the main points of Gregorian Calendar.

“New year in Britain was on March 25th, for a while.” Their tax year now begins on April 6 because of their calendar change. Related topics: Microsoft Excel falsely pretends 1900 was a leap year. . And I hate times like 12:00 am or pm. We have perfectly good words “noon” and “midnight” so why not use them?

Did you notice the function in the above code:

   logical function is_leap_year( year )
      integer, intent(in) :: year
      is_leap_year =  (modulo(year,400)==0) .or. ((modulo(year,4)==0) .and. (modulo(year,100).ne.0))
      return
   end function is_leap_year

Since this expression only tests against 0, it works just as well using mod() as modulo().

No, I haven’t noticed. My fault. Thanks