clipDate (Day { year = y, month = m, day = d }) = let m' = clipDate (Month y m) in Day {
    year = year m', month = month m',
    day  = max 1 . min (fromIntegral (gregorianMonthLength (year m') (fromIntegral (month m')))) $ d
    }
clipDate (Day { year = y, month = m, day = d }) = let m' = clipDate (Month y m) in Day {
    year = year m', month = month m',
    day  = max 1 . min (fromIntegral (gregorianMonthLength (year m') (fromIntegral (month m')))) $ d
    }
clipDate (Day { year = y, month = m, day = d }) = let m' = clipDate (Month y m) in Day {
    year = year m', month = month m',
    day  = max 1 . min (fromIntegral (gregorianMonthLength (year m') (fromIntegral (month m')))) $ d
    }