Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Haskell] ANNOUNCE: time-1.2.0.4

8 views
Skip to first unread message

Ashley Yakeley

unread,
Feb 3, 2011, 1:24:21 AM2/3/11
to has...@haskell.org, Michael Gurlitz
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


_______________________________________________
Haskell mailing list
Has...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

0 new messages