Front page | perl.perl6.language |
Postings from April 2010
Re: r30425 - docs/Perl6/Spec/S32-setting-library
Thread Previous
From:
Mark J. Reed
Date:
April 21, 2010 05:48
Subject:
Re: r30425 - docs/Perl6/Spec/S32-setting-library
Message ID:
q2vf60fe001004210548h82a4d8c4x4781ab0974a324e1@mail.gmail.com
Ok, so no fixed epoch, and arithmetic on Dates operates in integral days.
Sold.
It would be handy to have some predefined constants for some common epochs,
like JD, MJD, JD, etc. Those don't necessarily need to be in core for
6.0.0, though. Maybe a separate Date::Epochs module? Examples:
const $JD0 = Date.new(-4713, 11, 25) ; # or Date::Julian.new(-4712,1,1) ?
const $MJD0 = $JD0 + 2_400_000;
const $RD0 = Date.new(0,12,31);
(Those are assuming a continuous numeric range for years, with 0 = 1 BCE, -1
= 2 BCE, etc. Haven't double-checked the spec, but IIRC that's how it's
defined.)
On Wed, Apr 21, 2010 at 4:54 AM, <pugs-commits@feather.perl6.nl> wrote:
> Author: moritz
> Date: 2010-04-21 10:54:00 +0200 (Wed, 21 Apr 2010)
> New Revision: 30425
>
> Modified:
> docs/Perl6/Spec/S32-setting-library/Temporal.pod
> Log:
> [S32::Temporal] remove .daycount method - use $date - $start_of_epoch to
> obtain a day count starting from a fix epoch
--
Mark J. Reed <markjreed@gmail.com>
Thread Previous