Author: autarch
Date: 2009-02-20 21:30:29 +0100 (Fri, 20 Feb 2009)
New Revision: 25461
Modified:
docs/Perl6/Spec/S32-setting-library/Temporal.pod
Log:
Make the Temporal::Time $.second attribute a Num, per TimToady, and do
away with attoseconds entirely.
Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Temporal.pod 2009-02-20 17:20:37 UTC
(rev 25460)
+++ docs/Perl6/Spec/S32-setting-library/Temporal.pod 2009-02-20 20:30:29 UTC
(rev 25461)
@@ -111,21 +111,14 @@
role Temporal::Time {
my subset Hour of Int where { 0 <= $^a <= 23 };
my subset Minute of Int where { 0 <= $^a <= 59 };
- my subset Second of Int where { 0 <= $^a <= 60 };
- my subset Attosecond of Int where { 0 <= $^a <= 10**18 };
+ my subset Second of Num where { 0 <= $^a <= 60 };
has Hour $.hour = 0;
has Minute $.minute = 0;
has Second $.second = 0;
- # 10^-18 - there's really no point in going any smaller (this
- # is the smallest unit ever measured), but maybe it's better
- # to make $.second a floating point value instead?
- has Attosecond $.attosecond = 0;
- method fractional-second () { self.second / 10**18 }
-
method iso8601 () returns Str
- { [ self.hour, self.minute, self.fractional-second ].join(':') }
+ { [ self.hour, self.minute, self.second ].join(':') }
method Str { self.iso8601() };
@@ -135,8 +128,6 @@
$self.minute <=> $other.minute
||
$self.second <=> $other.second
- ||
- $self.attosecond <=> $other.attosecond;
}
}