On Sun, Jul 11, 2010 at 12:56 PM, pugs-comm...@feather.perl6.nl wrote:
Author: Kodi
Date: 2010-07-11 19:56:33 +0200 (Sun, 11 Jul 2010)
New Revision: 31627
Modified:
docs/Perl6/Spec/S32-setting-library/Temporal.pod
Log:
[S32/Temporal] Changed to use a different way of specifying time zones,
which is hopefully saner than my last proposal.
Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod
===
--- docs/Perl6/Spec/S32-setting-library/Temporal.pod2010-07-11 17:09:44
UTC (rev 31626)
+++ docs/Perl6/Spec/S32-setting-library/Temporal.pod2010-07-11 17:56:33
UTC (rev 31627)
@@ -15,8 +15,8 @@
Created: 19 Mar 2009
-Last Modified: 8 Apr 2010
-Version: 7
+Last Modified: 11 July 2010
+Version: 8
The document is a draft.
@@ -88,11 +88,12 @@
All four of the aforementioned forms of Cnew accept two additional named
arguments. C:formatter is a callable object that takes a CDateTime and
returns a string. The default formatter creates an ISO 8601 timestamp (see
-below). C:timezone is a callable object that takes a CDateTime and
-returns a two-element list giving the difference from UTC in (possibly
both
-negative, but not of opposite signs) hours and minutes. Alternatively,
-C:timezone can be a two-element list, which is interpreted as a static
-offset from UTC. The default time zone is C(0, 0) (i.e., UTC).
+below). C:timezone is a callable object that takes a CDateTime to
+convert and a CBool that specifies the direction of the conversion: to
+UTC if true, from UTC if false.
Perhaps it's just me, but a boolean value to specify the direction of
conversion seems wrong-ish. An enum with two values TO_UTC and FROM_UTC
would be a little more self-documenting.
-Scott