I think there's some confusion around the term "epoch" in this doc.
TAI is not an "epoch", and neither is a time value measured in fixed
units from some starting point. The starting point is the epoch.   One
may speak of the UNIX epoch (January 1, 1970 at midnight GMT), but the
current time_t value is not an "epoch" or "epoch value".

TAI doesn't really have a well-defined epoch.  You could make a case
for the logical starting point of the Gregorian calendar,
01-01-01T00:00:00 (or even 00-00-00T00:00:00, which maps to November
30, 2 BC in more conventional notation).  Or you could use the instant
that the original version of TAI went into effect
(1958-01-01T00:00:00), or the instant that the current
(relativistically-corrected for gravity) version went into effect
(1977-01-01T00:00:00).  The latter instant is itself used as the epoch
of some astronomical time scales (Barycentric Coordinate Time,
Geocentric Coordinate Time, and Terrestrial Time).  But whatever epoch
you choose to count your TAI seconds from, the value you wind up with
for any other instant is not itself an "epoch."

I would change the doc to refer to TAI as a "time scale", and also
avoid referring to the numerical value of an Instant as an "epoch".


On Wed, Sep 9, 2009 at 8:33 AM, <pugs-comm...@feather.perl6.nl> wrote:
> Author: ruoso
> Date: 2009-09-09 14:33:35 +0200 (Wed, 09 Sep 2009)
> New Revision: 28213
>
> Modified:
>   docs/Perl6/Spec/S32-setting-library/Temporal.pod
> Log:
> [spec-S32-Temporal] uses Instant instead of Rat for the return of time(), 
> Allow base Duration type to work with TAI-seconds delegating to 
> Gregorian::Duration otherwise, Add some methods to Gregorian::DateTime to 
> make the distinction of Instant vs DateTime more evident
>
> Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod
> ===================================================================
> --- docs/Perl6/Spec/S32-setting-library/Temporal.pod    2009-09-09 06:46:34 
> UTC (rev 28212)
> +++ docs/Perl6/Spec/S32-setting-library/Temporal.pod    2009-09-09 12:33:35 
> UTC (rev 28213)
> @@ -30,8 +30,10 @@
>  repository under /docs/Perl6/Spec/S32-setting-library/Temporal.pod so edit 
> it there in
>  the SVN repository if you would like to make changes.
>
> -=head1 Current Time
> +=head1 Roles
>
> +=head2 Instant
> +
>  The epoch used in Perl 6 to represent time instants is the
>  International Atomic Time - TAI - which is independent of calendars,
>  timezones as well as leap seconds. Of course Perl can't go beyond the
> @@ -39,12 +41,10 @@
>  platform-specific transformation to give you the most precise value it
>  can for the TAI.
>
> - our Rat sub time()
> + our Instant sub time()
>
>  Returns a TAI epoch value for the current time.
>
> -=head1 Roles
> -
>  =head2 Calendar
>
>  Every DateTime needs to follow the rules of a given calendar. The
> @@ -148,10 +148,11 @@
>  for DateTime math. It is also very calendar-dependent, in a way that
>  only a very fundamental data is seen here.
>
> -As with DateTime, to make the most common case easier, this type
> -delegates the constructor to Gregorian::Duration.
> +The base Duration object is only TAI-seconds aware, but if you use its
> +constructor with any other parameters it will delegate to
> +Gregorian::Duration in order to make the most common cases easier.
>
> -The following method is implemented by all Duration objects.
> +The following attribute is declared:
>
>  =over
>
> @@ -226,6 +227,20 @@
>
>  =back
>
> +The following methods provide additional information
> +
> +=over
> +
> +=item week-of-year
> +
> +=item day-of-week
> +
> +=item week-of-month
> +
> +=item year-of-week
> +
> +=back
> +
>  =head2 Gregorian::Duration
>
>  The gregorian Duration declares the following attributes.
>
>



-- 
Mark J. Reed <markjr...@gmail.com>

Reply via email to