lib: doubledatespanp: fix and re-enable doctest

This commit is contained in:
Henning Thielemann 2020-07-31 16:26:33 +02:00 committed by Simon Michael
parent dc41cee2b0
commit ccac09fb1b

View File

@ -979,8 +979,8 @@ periodexprdatespanp rdate = choice $ map try [
]
-- |
-- -- >>> parsewith (doubledatespan (parsedate "2018/01/01") <* eof) "20180101-201804"
-- Right DateSpan 2018-01-01..2018-04-01
-- >>> parsewith (doubledatespanp (parsedate "2018/01/01") <* eof) "20180101-201804"
-- Right DateSpan 2018Q1
doubledatespanp :: Day -> TextParser m DateSpan
doubledatespanp rdate = liftA2 fromToSpan
(optional (string' "from" *> skipNonNewlineSpaces) *> smartdate)