
Yitzchak Gale wrote:
The API for parsing and rendering time in Data.Time is based on the standard API for that in C - like the libraries in most languages. It's pretty standard stuff.
I'm sure it can be improved upon though. If you have a useful alternative time parsing library, please release it on Hackage.
In the perl world, there is a Date::Parse library that I have found very useful in many situations. It can parse any date format you throw at it, fairly reliably[1]. The closest I have in Haskell is the attached module, which I used to parse all dates in all Usenet posts between 1981 and 1991. While small portions are specific to Usenet messages it does have quite a lot of generic parsing code, and perhaps most usefully, a large number of date format strings, and I have thought about making a library if I find time. (Or anyone is welcome to take it and do so.) It's based on Data.Time.Parse instead of Data.Time.Format.parseTime, probably because I didn't notice the latter when I was writing it. -- see shy jo [1] m/d/y vs d/m/y being the main weakness of course