Skip to content

Commit

Permalink
Off by one errors are funny
Browse files Browse the repository at this point in the history
  • Loading branch information
The1Penguin committed Jun 4, 2024
1 parent 32466e2 commit 6e707ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6e707ce

Please sign in to comment.