summaryrefslogtreecommitdiff
path: root/t/format.t
diff options
context:
space:
mode:
Diffstat (limited to 't/format.t')
-rw-r--r--t/format.t21
1 files changed, 11 insertions, 10 deletions
diff --git a/t/format.t b/t/format.t
index c1ad071..ca3852f 100644
--- a/t/format.t
+++ b/t/format.t
@@ -13,7 +13,8 @@ is(DateTime::Format::GeekTime->format_datetime($dt),
}
{
-my $dt=DateTime::Format::GeekTime->parse_datetime("0xB4B1 0x0042 \x{b4b0}");
+my $format=DateTime::Format::GeekTime->new(2010);
+my $dt=$format->parse_datetime("0xB4B1 0x0042 \x{b4b0}");
is($dt->month,3);
is($dt->day,8);
is($dt->hour,16);
@@ -21,23 +22,23 @@ is($dt->minute,56);
is($dt->second,23);
is($dt->time_zone->name,'UTC');
-my $other=DateTime::Format::GeekTime->parse_datetime("0xB4B1 0x0042");
+my $other=$format->parse_datetime("0xB4B1 0x0042");
cmp_ok($dt,'==',$other);
-$other=DateTime::Format::GeekTime->parse_datetime("0xB4B1 on day 0x0042");
+$other=$format->parse_datetime("0xB4B1 on day 0x0042");
cmp_ok($dt,'==',$other);
-$other=DateTime::Format::GeekTime->parse_datetime("B4B1 0042");
+$other=$format->parse_datetime("B4B1 0042");
cmp_ok($dt,'==',$other);
-$other=DateTime::Format::GeekTime->parse_datetime("B4B10042");
+$other=$format->parse_datetime("B4B10042");
cmp_ok($dt,'==',$other);
-$other=DateTime::Format::GeekTime->parse_datetime("b4b10042");
+$other=$format->parse_datetime("b4b10042");
cmp_ok($dt,'==',$other);
-$other=DateTime::Format::GeekTime->parse_datetime("0xB4B1 0x042");
+$other=$format->parse_datetime("0xB4B1 0x042");
cmp_ok($dt,'==',$other);
-$other=DateTime::Format::GeekTime->parse_datetime("B4B1 042");
+$other=$format->parse_datetime("B4B1 042");
cmp_ok($dt,'==',$other);
-$other=DateTime::Format::GeekTime->parse_datetime("B4B1042");
+$other=$format->parse_datetime("B4B1042");
cmp_ok($dt,'==',$other);
-$other=DateTime::Format::GeekTime->parse_datetime("b4b1042");
+$other=$format->parse_datetime("b4b1042");
cmp_ok($dt,'==',$other);
}