Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder how Perl's DateTime::Format::ISO8601 [1] holds up...

[1] https://metacpan.org/module/DateTime::Format::ISO8601



Seems to be fine:

  $ re.pl

  >> use aliased 'DateTime::Format::ISO8601';

  >> ISO8601->parse_datetime("2012-012");
  2012-01-12T00:00:00

  >> ISO8601->parse_datetime("2012-366");
  2012-12-31T00:00:00

  >> ISO8601->parse_datetime("2012-12");
  2012-12-01T00:00:00

  >> ISO8601->parse_datetime("2012");
  2012-01-01T00:00:00
And if it isn't then there is also Date::ISO8601 [1] which is written by Zefram [2] who is renowned for being a Date/Time nut [3] :)

1 - https://metacpan.org/module/Date::ISO8601

2 - https://metacpan.org/author/ZEFRAM

3 - https://metacpan.org/module/Date::Darian::Mars




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: