[Haskell-cafe] How to parse a date and time?
Bjorn Bringert
bringert at cs.chalmers.se
Tue May 8 06:28:23 EDT 2007
On May 8, 2007, at 1:04 , Justin Bailey wrote:
> Looking at the libraries documentation, it seems like parsing a
> string into a time and date should be as simple as:
>
> import Data.Time.Format (parseTime)
>
> myDate = parseTime "..."
>
>
> where "..." is some string. But these functions don't seem to
> exist! I can't find many references to them in the wild, and the
> module " Data.Time.Format" is not found under GHC 6.6 or Hugs. I
> am running Windows, if it makes a difference.
>
> Are the docs just out of date[1] or is it my install? How can I
> parse a string into a Data.Time.Calendar.Day value (or some other
> time value)? Thanks for any help!
>
> Justin
>
>
> [1] http://haskell.org/ghc/docs/latest/html/libraries/time/Data-
> Time-Format.html
parseTime is still only available in the darcs version of the time
package. I don't know why the GHC library docs have the darcs version
rather than the version that comes with the latest release.
You can get the darcs version of the time package with:
darcs get --partial http://darcs.haskell.org/packages/time/
/Björn
More information about the Haskell-Cafe
mailing list