I’d love to know if there is a module to parse ‘human formatted’ dates in Perl. I mean things like ‘tomorrow’, ‘Tuesday’, ‘next week’, ‘1 hour ago’.
My research with CPAN suggest that there is no such module, so how would you go about creating one? NLP is way over the top for this.
Date::Manip does exactly this.
Here is an example program:
Which results in the following output:
UnixDate is one of the functions provided by
Date::Manip, the first argument is a date/time in any format that the module supports, the second argument describes how to format the date/time. There are other functions that just parse these ‘human’ dates, without formatting them, to be used in delta calculations, etc.