From 966576ab1adcc5c794e0c0f72dfee645be69aa5a Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Thu, 22 Dec 2022 20:13:03 -0500 Subject: [PATCH] FIX use correct length of range --- lib/Internal/Utils.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Internal/Utils.hs b/lib/Internal/Utils.hs index 618f348..d53a9e4 100644 --- a/lib/Internal/Utils.hs +++ b/lib/Internal/Utils.hs @@ -66,7 +66,7 @@ compareDate (In md offset) x = case fromMatchYMD md of (y, m, _) = toGregorian x compareRange start z | z < start = LT - | otherwise = if (start + fromIntegral offset) < z then GT else EQ + | otherwise = if (start + fromIntegral offset - 1) < z then GT else EQ toMonth year month = (year * 12) + fromIntegral month dateMatches :: MatchDate -> Day -> Bool