Show quoted text> It is a bit peculiar that '01:00am' is allowed but '00:59am' is not,
> surely?
In 12-hour time, there is no 00 hour, so the fact that 00:59 doesn't exist in 12-hour time is not peculiar... it's expected. Likewise the fact that 13:00 doesn't exist in 12-hour time isn't peculiar either. These 'peculiarities' are simply pare of the definition of how the time is to be expressed.
My goal with Date::Manip 6.xx is to handle every valid date operation. Given a valid date, I want to do every possible (or at least, every possible common) operation with it.
But what if I have an invalid date? What is 5 hours after -03:00? I don't know because '-03:00' is not a valid date.
It is true that I can reasonably guess what is meant by both '00:59 AM' and '13:00 PM'... but that doesn't change the fact that neither refer to valid dates.
What you are asking for, in essence, is for me to extend Date::Manip to accept an invalid date and guess/infer/determine what valid date was being referred to.
That's an operation that I have never set out to do, and one that I'm not terribly interested in. There's too much ambiguity in that problem.
If a user supplies the date '13:00 PM', then, IMO, the correct response should be that your program says "Hey, that's not a valid time. Try again.". If you want to try to guess what the user was meaning, be my guess, but with very few exceptions (such as the one you present), you're not going to be able to do so.
So, although I understand your suggestion (and as I said, it would actually be pretty easy to add), it's not something that I consider a valid extension of Date::Manip, so I'm going to pass on it.