From 6e707ce5d62052c9d0e6b09e4d93b1f4416d233f Mon Sep 17 00:00:00 2001 From: pingu Date: Tue, 4 Jun 2024 22:39:05 +0200 Subject: [PATCH] Off by one errors are funny --- src/Util.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Util.hs b/src/Util.hs index 27ccac5..bcef304 100644 --- a/src/Util.hs +++ b/src/Util.hs @@ -35,7 +35,7 @@ removeWhitespaceTags = nextDay :: YearMonthDay -> YearMonthDay nextDay (YearMonthDay y m d) | d < len = YearMonthDay y m (d + 1) - | m < 12 = YearMonthDay y (m + 1) (d - len) - | otherwise = YearMonthDay (y + 1) 1 (d - len) + | m < 12 = YearMonthDay y (m + 1) 1 + | otherwise = YearMonthDay (y + 1) 1 1 where len = gregorianMonthLength y m