[Omaha.pm] converting dates

Jay Hannah jay at jays.net
Thu Sep 9 17:11:32 CDT 2004


On Sep 9, 2004, at 2:23 PM, Terry wrote:
> I want to be able to take an number which is the # of days since
> 1/1/70 and convert it into a user-friendly date.
>
> Like 12594 for example.

% cat j.pl
#!/usr/bin/perl

use Date::Calc qw( Add_Delta_Days Date_to_Text_Long );
print
    Date_to_Text_Long(
       Add_Delta_Days(1970, 1, 1, $ARGV[0])
    ), "\n";

% perl j.pl 12594
Friday, June 25th 2004

HTH,

j



More information about the Omaha-pm mailing list