Skip Menu |

This queue is for tickets about the Time-Date CPAN distribution.

Report information
The Basics
Id: 107093
Status: resolved
Priority: 0/
Queue: Time-Date

People
Owner: Nobody in particular
Requestors: mst [...] shadowcat.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: What does this achieve that Time::Piece and Time::Moment don't?
Date: Mon, 14 Sep 2015 20:55:46 +0000
To: bugs-Time-Date [...] rt.cpan.org
From: Matt S Trout <mst [...] shadowcat.co.uk>
I can't quite work out why you'd want to use this over the existing code? -- Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/ Email me now on mst (at) shadowcat.co.uk and let's chat about how our CPAN commercial support, training and consultancy packages could help your team.
I have the same question. Consider this a request to add a “Wherefore Time::Date?” section to your POD.
On Mon Sep 14 17:33:45 2015, mst@shadowcat.co.uk wrote: Show quoted text
> I can't quite work out why you'd want to use this over the existing code? >
It's just a preference. I like that underlying data structure is the unix epoch instead of the list of numbers returned by localtime. It comes in handy when comparing dates. It's also nice when you have to work with dates formatted like "2017-01-02 03:04:05" (mysql returns dates like this) which you can use in this module like Time::Date->new("2017-01-02 03:04:05") and then you can print it back out like print "$date\n".