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.