diff options
author | dakkar <dakkar@thenautilus.net> | 2020-01-02 14:23:46 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2020-01-02 14:23:46 +0000 |
commit | 555fd9e02d6ef01f61eb548dd6303689e7874699 (patch) | |
tree | 89862ee73daef88976f316e23dd74555ec06126e | |
parent | more ignore (diff) | |
download | DateTime-Format-GeekTime-master.tar.gz DateTime-Format-GeekTime-master.tar.bz2 DateTime-Format-GeekTime-master.zip |
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | lib/DateTime/Format/GeekTime.pm | 2 | ||||
-rw-r--r-- | t/format.t | 21 |
3 files changed, 15 insertions, 11 deletions
@@ -1,3 +1,6 @@ +2020-01-02 v1.001 + fix tests on leap years + 2017-06-21 v1.000_002 [bugfix] never output surrogate codepoints diff --git a/lib/DateTime/Format/GeekTime.pm b/lib/DateTime/Format/GeekTime.pm index 8bea888..d914c11 100644 --- a/lib/DateTime/Format/GeekTime.pm +++ b/lib/DateTime/Format/GeekTime.pm @@ -6,7 +6,7 @@ use DateTime; use Carp; use vars '$VERSION'; -$VERSION='1.000_002'; +$VERSION='1.001'; $VERSION=eval $VERSION; sub new { @@ -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); } |