
(startYear, endYear) = (1901,2000)
startOffset = 1 -- Jan 1 1901 was a Tuesday
targetDay = 6 -- searching for Sundays

monthLengths = [31,28,31,30,31,30,31,31,30,31,30,31]
monthLengthsLeap = 31:29:(drop 2 monthLengths)

(yearlyOffset, yearlyOffsetLeap) = (1,2)
--map ((`mod` 7) . sum) [monthLengths, monthLengthsLeap]

isLeap y =
  y `rem` 4 == 0 &&
  (y `rem` 100 /= 0 ||
    y `rem` 400 == 0)