ay $b->epoch;
cmp_ok $date->epoch, '>', $b->epoch;
cmp_ok $date, '>', $b;
isnt $date, $b;
is $date->to_string, $b->to_string;
}
};
subtest 'clone with tz' => sub {
date('2014-01-01 00:00:00');
is $date->to_string, '2014-01-01 00:00:00';
isnt $date, $src;
}
};
subtest 'with other' => sub {
foreach my $zone ("Europe
one;
$date->to_timezone($zone);
is $date->epoch, $src->epoch;
isnt $date->to_string, $src->to_string;
}
};
};
subtest 'tz()' => sub {
for my $zone
is($date2->tzname, tzget()->name);
$date2 = $date->clone(tz => 'Australia/Melbourne');
isnt($date2->epoch, $date->epoch);
is($date2.'', $date.'');
ok(!$date2->tzlocal);
is($date
e);
$date3 = $date3->clone(month => 2, tz => "");
is($date3, "2013-02-10 01:02:03");
isnt($date3->tzname, $date2->tzname);
ok($date3->tzlocal);
is($date3->tzname, tzget()->name);
");
is $rel->to_string, "1Y 1M 1D 1h 1m 1s";
is $rel->duration, 34304461;
isnt $rel->duration, rdate($rel->to_string)->duration;
is $rel->from, "2012-03-02 15:47:32";
is $rel->from, "2013-04-03 16:48:33";
is $rel->till, "2012-03-02 15:47:32";
isnt $rel->duration, rdate($rel->to_string)->duration;
};
subtest 'rdate' => sub {
is
cmp_ok($rel, '<', "2Y");
cmp_ok($rel, '==', "1Y 2M");
cmp_ok($rel, '==', "14M");
isnt($rel, "14M");
ok(!eval {2/YEAR});
# reverse test
is('10D' - MONTH, "-1M 10D
e/Kiev');
my $date_cloned = thaw($frozen);
is($date_cloned->epoch, $dts);
isnt($date_cloned.'', $date.'');
ok($date_cloned->tzlocal);
is($date_cloned->tzname, '
x $date->epoch, 1_000_000_000.000001;
is($date->to_string, "2001-09-09 05:46:40.000001");
isnt($date, "2001-09-09 05:46:40");
is($date, Date->new("2001-09-09 05:46:40.000001"));
is("$d