in reply to Multiple date format

Further to salva's excellent answer, there is also Date::Calc which is less resource-intensive than Date::Manip and almost as flexible.

Also, just as a note, if you have formats that alternately specify dd-mm-yyyy and mm-dd-yyyy in all numbers you won't be able to reliably parse those dates because there is no way for the parser to tell them apart in many cases (your example doesn't give that, but it does give mm-dd-yyy and dd-month-yyyy, so I thought I'd flag this).


Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan