3 Feb
2011
3 Feb
'11
6:15 a.m.
A small update, time-1.2.0.4 fixes a bug in parseTime reported to me by Michael Gurlitz:
import Data.Time import Data.Time.Clock import System.Locale
main = print (parseTime defaultTimeLocale "%e %B %Y" "April 2000" :: Maybe Day) -- Just *** Exception: Prelude.read: no parse
Specifically:
parseTime defaultTimeLocale "%e" "" :: Maybe Day -- Just *** Exception: Prelude.read: no parse
In time-1.2.0.4, they now correctly evaluate to Nothing. I've updated the unit tests to catch this too. -- Ashley Yakeley