On Mon, 24 Mar 2003, Joshua Hoblitt wrote:
Maybe something like this should be added to the docs?
--
diff -ur DateTime-0.08/lib/DateTime.pm new.DateTime/lib/DateTime.pm
--- DateTime-0.08/lib/DateTime.pm 2003-03-20 20:02:27.0 -1000
+++ new.DateTime/lib/DateTime.pm
The reason I'm not sure it belongs in the docs is that it may be better as
part of the upcoming FAQ.
Or maybe a DateTime::Cookbook?
-J
--
On Mon, 24 Mar 2003, Joshua Hoblitt wrote:
The reason I'm not sure it belongs in the docs is that it may be better as
part of the upcoming FAQ.
Or maybe a DateTime::Cookbook?
Sure. I suppose the FAQ could be turned into POD somehow and included
with each DateTime.pm release or something
Speaking of Date::Manip. :)
--
#!/usr/bin/env perl
use strict;
use warnings;
use DateTime;
use DateTime::Format::MySQL;
use Date::Manip ();
use Benchmark qw(cmpthese);
print Compare dates\n;
cmpthese( -5, {
DateTime = sub {
my $dt1 = DateTime-now();
On Mon, 24 Mar 2003, Joshua Hoblitt wrote:
DateTime = sub {
my $dt1 = DateTime-now();
$dt1-set_time_zone( '-1000' );
my $dt2 = DateTime::Format::MySQL-parse_datetime( 2000-05-10
15:15:00 );
my $dt_dur = DateTime::Duration-new(
And this could be sped up. Move making the duration object out of the
sub, and make it like this:
I was trying to be fair and not preserve information between runs. Of course in the
real world...
my $dt_dur = DateTime::Duration-new( days = -4 );
and inside the sub call add_duration