I'm trying to use Haskell to process some data I wish to analyse. This data is mostly structured, but inconsistently so. Dates may have a number of representations, though always ocuring in the same place (the documents are XML).
The differing formats I have seen thus far are:
"25th February 1971"
"Thursday. 22nd June. 1972."
"3rd July. 1973."
"Thursday 17th October \r\n 1974."
"Friday, 5th March, 1976."
"25th April \r\n 1977."
"Tuesday 6th December 1983"
" 10 May 1988"
"October 20th 1988"
I don't really know where to start - any individual format I could deal with, but I'm not sure how to deal with all of them. I would like a function String -> Maybe Day.