Fuzzy Date Analysis in Haskell (or C)

Is there a good library for parsing dates from a string in Haskell or ANSI C? Something like PHP strtotime, or Ruby Time.parse or Chronic, or something else.

If he can analyze "next week", etc., then this is ideal, but even if he can simply determine for himself in what format the full date string is and return the result, this will be quite good.

I would prefer not to transfer the Chronicle or not to extract the walkthrough manually ...

+5
source share
2 answers

After a big hunt, I found that the date code in Git is pretty good and not very dependent on the rest of Git, so I pulled it out and did http://hackage.haskell.org/package/git-date

I want to use the best solution, if any :)

+6
source

It does not process the style โ€œnext weekโ€, but the Data.Time.Format module from the time library is essentially what you want, I think, and it is enabled by default with the Haskell platform. Just scroll down the haddock documents until you get to the parsing section.

+1
source

All Articles