On Thu, 24 Mar 2005 [EMAIL PROTECTED] wrote:
I was wondering if DateTime has a method for converting rata die (in
particular rd seconds) to a gregorian date? I've done a bit of digging,
but I'm not finding one, only methods for going G - RD.
Do you mean rata die days expressed in seconds (X * 86400)?
You could look in DateTimePP.pm and _rd2ymd and _seconds_as_components for
similar code. The latter assumes that it will never get more than (86400
+ leap seconds) seconds. You could first convert seconds to rata die
days, and then convert each part separately.
The trick for what you're asking would be handling leap seconds. Of
course, if you don't need to it's trivial.
-dave
/*===
VegGuide.Orgwww.BookIRead.com
Your guide to all that's veg. My book blog
===*/