Subject: | TIme::Piece can't create an object with Julian Date |
Date: | Wed, 28 Aug 2013 11:38:08 -0400 |
To: | bug-Time-Piece [...] rt.cpan.org |
From: | David Weintraub <david [...] weintraub.name> |
This doesn't work as expected:
use strict;
use warnings;
use feature qw(say);
use Time::Piece;
use Time::Seconds;
use Data::Dumper;
my $year = "12";
my $days_in_year = "212";
my $julian_date = $year . $days_in_year;
my $time = Time::Piece->strptime( $julian_date, "%y%j" );
say $time->ymd("/");
This returns 2012/01/01 instead of 2012/07/30. The %j part of the date is ignored.
--
David Weintraub
qazwart@gmail.com
perl -e 'print "Just another second rate Perl Hacker\n";'