in reply to Converting Julian Dates to Text

IIRC, Excel's dates are offset at 1900. So, the following should get you close to a solution:

use Time::JulianDay; my $jd = 39749 + julian_day(1900, 1, 0); my ($year, $month, $day) = inverse_julian_day($jd); print "$year-$month-$day\n"; # 2008-10-29

(someone else will probably be able to explain why this produces Oct 29, not Oct 28... :)

Replies are listed 'Best First'.
Re^2: Converting Julian Dates to Text
by ikegami (Patriarch) on Oct 28, 2008 at 04:18 UTC