[Haskell] ANNOUNCE: time-1.2.0.4

Ashley Yakeley ashley at semantic.org
Thu Feb 3 07:15:28 CET 2011


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




More information about the Haskell mailing list