Code would be nice but a point in the right direction is good as well.
CPAN? RegEx?
I’ve seen both ways
“yyyy-MM-dd’T’HH:mm:ssZ”;
“yyyy-MM-ddTHH:mm:ssZ”;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ether is definitely on the right track with DateTime. Using DateTime, you can be sure that you have a time that actually exists, where something on Feb 29, 2000 might get by if you wrote the checks yourself.
Your format looks like an ISO8601 string. So, use DateTime::Format::ISO8601 to do your parsing.
You could use other format modules, such as D::F::Strptime, but you will wind up recreating what ISO8601 formatter already does.