Am Fr 16. Mär 2012, 12:26:27, ken.ingram@gmail.com schrieb:
Show quoted text> 1. Output the date with YYYY format instead of YY
Just pass the date to a Date::* module on CPAN and format
the date accordingly.
#!/usr/bin/perl
use warnings;
use strict;
use lib '../lib';
use LBMA::Statistics;
use Date::Manip;
my $lbma = LBMA::Statistics->new();
# @fixings
# 0 date
# 1 GOLD A.M. USD
# 2 GOLD A.M. GBP
# 3 GOLD A.M. EUR
# 4 GOLD P.M. USD
# 5 GOLD P.M. GBP
# 6 GOLD P.M. EUR
my (
$date,
$gold_am_usd, $gold_am_gbp, $gold_am_eur,
$gold_pm_usd, $gold_pm_gbp, $gold_pm_eur,
)
=
$lbma->dailygoldfixing( year => 2009, month => 2, day => 2 );
print "$date\n";
my @format = '%d-%b-%Y';
print UnixDate( $date, @format ), "\n";
exit;