[Haskell-cafe] Fwd: Data.Time
ashley at semantic.org
Sat Jul 2 23:14:55 CEST 2011
On 2011-07-02 13:22, Yitzchak Gale wrote:
> Ashley, heads up! I am CCing you on this message because
> I think a problem has been found with Data.Time.Format.
>> when you think that this is not a parseable date:
>> 2011/1/30 (because the month must be padded by zeros).
> Hmm, that does seem wrong. The C API allows that to be
> parsed using the format "%Y/%m/%d", since the leading zero
> for %m and %d are optional when parsing.
> See, for example,
This was fixed in time-184.108.40.206. From the haddock for parseTime:
"Supports the same %-codes as formatTime, including %-, %_ and %0
Prelude System.Locale Data.Time> parseTime defaultTimeLocale
"%Y/%-m/%-d" "2011/1/30" :: Maybe Day
Loading package old-locale-220.127.116.11 ... linking ... done.
Loading package time-18.104.22.168 ... linking ... done.
More information about the Haskell-Cafe