Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Converting Julian Dates to Text

by almut (Canon)
on Oct 28, 2008 at 03:54 UTC ( [id://719898]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://719898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found