[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] converting dates




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