Let's talk about Time::Moment and round-trip of strings
In my previous blog post I wrote a lot more about Time::Moment, than appeared in the post (could have been my mistake due to a preview and error and a incomplete copy and a paste, but still very inconvenient). So I have decided to break down my original blogpost in several blogposts.
Time::Moment implements a subset of ISO 8601 (known as 4.3 Date and time of day, 4.3.2 Complete representations), Wikipedia has a good article regarding ISO 8601, but it's not an authoritative source for the ISO 8601:2004(E) standard.
Time::Moment is capable of parsing any string that purports to be formatted in ISO 8601:2004(E), 4.3.2 Complete representation.
Such formats includes the following:
Combinations of calendar date and time of day:
Combinations of ordinal date and time of day:
Combinations of week date and time of day:
All of the above ISO 8601 formats can be round-trip'ed with excellent performance using Time::Moment->from_string()
Benchmarking parsing: '2013-12-24T12:34:56.123456+02:00'
Rate DT::F::ISO8601 DT::F::RFC3339 Time::Moment
DT::F::ISO8601 6938/s -- -37% -100%
DT::F::RFC3339 11019/s 59% -- -100%
Time::Moment 2715276/s 39037% 24542% --