Author: autarch Date: 2009-02-23 18:49:28 +0100 (Mon, 23 Feb 2009) New Revision: 25500
Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod Log: Some fixes to make this valid Perl 6 (returns is out, our RETTYPE is in) Also some other formatting fixlets Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Temporal.pod 2009-02-23 09:32:46 UTC (rev 25499) +++ docs/Perl6/Spec/S32-setting-library/Temporal.pod 2009-02-23 17:49:28 UTC (rev 25500) @@ -78,15 +78,16 @@ # This can be cached internally, but it's a calculated value, # not an attribute. - method day-of-week () returns DayOfWeek; + our DayOfWeek method day-of-week (); # These always return the long English names - method month-name () returns Str; # "January" - method day-name () returns Str; # "Tuesday" + our Str method month-name () ; # "January" + our Str method day-name (); # "Tuesday" # returns the date formatted in ISO8601 style - 2008-01-25 - method iso8601 () returns Str - { [ self.year, self.month, self.date ].join('-') }; + our Str method iso8601 () { + [ self.year, self.month, self.date ].join('-'); + } method Str { self.iso8601 }; @@ -117,7 +118,7 @@ has Minute $.minute = 0; has Second $.second = 0; - method iso8601 () returns Str + our Str method iso8601 () { [ self.hour, self.minute, self.second ].join(':') } method Str { self.iso8601() }; @@ -143,7 +144,7 @@ # The ISO8601 standard does not allow for offsets with # sub-minute resolutions. In real-world practice, this is not # an issue. - method iso8601 returns Str { + our Str method iso8601 { my $hours = self.offset.abs / 3600; my $minutes = self.offset.abs % 3600; @@ -171,14 +172,15 @@ has Temporal::Time $!time handles <hour minute second fractional-second>; has Temporal::TimeZone::Observance $!timezone handles <offset isdst>; - method iso8601 () returns Str - { self.date.is8601 ~ 'T' ~ self.time.iso8601 ~ self.timezone.iso8601 } + our Str method iso8601 () { + self.date.is8601 ~ 'T' ~ self.time.iso8601 ~ self.timezone.iso8601; + } method Str { self.iso8601 } # This involves a whole bunch of code - see Perl 5's # Time::Local - method epoch returns Num { ... } + our Num method epoch { ... } method Int { self.epoch.truncate }