diff --git a/hledger-lib/Hledger/Data/Dates.hs b/hledger-lib/Hledger/Data/Dates.hs index 33ecaeef6..dd34898a3 100644 --- a/hledger-lib/Hledger/Data/Dates.hs +++ b/hledger-lib/Hledger/Data/Dates.hs @@ -919,7 +919,9 @@ lastthisnextthing = do -- >>> p "every 2nd day of month 2009-" -- Right (DayOfMonth 2,DateSpan 2009/01/01-) periodexprp :: Day -> TextParser m (Interval, DateSpan) -periodexprp rdate = surroundedBy (skipMany spacenonewline) . choice $ map try [ +periodexprp rdate = do + skipMany spacenonewline + choice $ map try [ intervalanddateperiodexprp rdate, (,) NoInterval <$> periodexprdatespanp rdate ]