in reply to Re: Date::Parse - how to correctly parse dates between 1901 and 1969
in thread Date::Parse - how to correctly parse dates between 1901 and 1969

I am using Date::Parse to parse datetimes that may be in different formats. The dates have come in like YYYYMMDD, YYYY-MM-DD, YYYYMMDD HH:MM, etc. Time::Piece->strptime() requires a defined input format. Time::Piece would certainly work once the datetime is well formatted. Is there and advantage to Time::Piece over DateTime?

  • Comment on Re^2: Date::Parse - how to correctly parse dates between 1901 and 1969

Replies are listed 'Best First'.
Re^3: Date::Parse - how to correctly parse dates between 1901 and 1969
by johngg (Canon) on Feb 20, 2018 at 11:27 UTC

    The only advantage is that it has been a core module since Perl 5.10 so it doesn't have to be installed from CPAN. I don't have much experience with Time::Piece and none at all with Date::Parse so can't really comment on usability.

    Cheers,

    JohnGG