Olivier Mengu? wrote: >A modified (starting at midnight in the local timezone) Julian Day seems to >be approriate for this task.
That's the Chronological Julian Date or Rata Die. Don't reinvent them; use one of the existing ones. >Do you have any recommandation for/against some modules that implement the >computation of the Julian Day? Date::JD converts between several flavours of Julian Date. Its documentation is also a handy reference for the flavours. Date::ISO8601 converts between Gregorian calendar dates and Chronological Julian Dates. It doesn't address time of day or timezones. The DateTime suite uses Rata Die a lot internally, and it's relatively easy to use it to convert between RD and other forms of time. The choice between Date::ISO8601 and DateTime really comes down to whether you need to substantially process time of day. DateTime tries to do the whole job but suffers from the unavoidable complexity; Date::ISO8601 is much cleaner but at the expense of only doing a much narrower job. -zefram
