in reply to Does ISO8601 require a separator in the time if one is used in the date?

The discussion to this point appears to be heading in a direction of which our brothers over at lawmonks.org would be proud.

In preference, why not just adhere to the Robustness Principle and use DateTime::Format::ISO8601 for your output but Regexp::Common for your input?

  • Comment on Re: Does ISO8601 require a separator in the time if one is used in the date?

Replies are listed 'Best First'.
Re^2: Does ISO8601 require a separator in the time if one is used in the date?
by 1nickt (Canon) on Mar 02, 2018 at 11:40 UTC

    Thanks hippo, it's a good point and in general a good rule. The problem is that if we accept scruffy datetimes with Regexp::Common::time then we can't parse them to prep for DB insertion using DateTime::Format::ISO8601 and the parsing becomes more complicated than it should be. Maybe the cleanest way would be to write a class that uses both of those modules and provides a single interface.


    The way forward always starts with a minimal test.