How are quarters defined? Where do(es) the extra day(s) go?
On Monday, April 12, 2010, wrote:
> Author: masak
> Date: 2010-04-12 15:12:54 +0200 (Mon, 12 Apr 2010)
> New Revision: 30370
>
> Modified:
> docs/Perl6/Spec/S32-setting-library/Temporal.pod
> Log:
> [S32/Temporal] replaced underscores with dashes in method names
>
> Also decided to go with 'timezone' rather than 'time_zone' or 'time-zone',
> for a flurry of reasons. Saves a character; looks more like the rest of the
> attributes; looks more like DateTime::TimeZone; emphasizes that it's one
> concept and not two; it was already partly that way by mistake. ;-)
>
> Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod
> ===
> --- docs/Perl6/Spec/S32-setting-library/Temporal.pod 2010-04-12 13:00:38
> UTC (rev 30369)
> +++ docs/Perl6/Spec/S32-setting-library/Temporal.pod 2010-04-12 13:12:54
> UTC (rev 30370)
> @@ -59,7 +59,7 @@
> calendar and someone's clock. You can create a C object from
> the C returned by the C function:
>
> - my $now = DateTime.from_epoch(time);
> + my $now = DateTime.from-epoch(time);
>
> This is such a common use case, that there's a C
> constructor that does this for you:
> @@ -114,30 +114,30 @@
>
> There are methods C, C, C, C, C, and
> C, giving you the corresponding values of the C
> -object. The C method also has the synonym C.
> +object. The C method also has the synonym C.
>
> The method C returns two values, the I and I.
> -(These are also available through the methods C and
> C,
> +(These are also available through the methods C and
> C,
> respectively.) The first week of the year is defined by ISO as the one which
> contains the fourth day of January. Thus, dates early in January often end
> up in the last week of the prior year, and similarly, the final few days of
> December may be placed in the first week of the next year.
>
> -There's a C method, which returns the day of the week as a
> +There's a C method, which returns the day of the week as a
> number 1..7, with 1 being Monday and 7 being Sunday.
>
> -The C method returns a number 1..5 indicating the
> +The C method returns a number 1..5 indicating the
> number of times a particular weekday has occurred so far during that
> month, the day itself included. For example, June 9, 2003 is the second
> Monday of the month, and so this method returns 2 for that day.
>
> The C method returns the quarter of the year, a value between 1
> -and 4. The C method returns the day of the quarter.
> +and 4. The C method returns the day of the quarter.
>
> -The C method returns the day of the year, a value between 1
> +The C method returns the day of the year, a value between 1
> and 366.
>
> -The method C returns the second truncated to an integer.
> +The method C returns the second truncated to an integer.
>
> The following methods work as a sort of formatting methods:
>
> @@ -150,7 +150,7 @@
> The single argument of each of those methods is optional, but the above
> shows the defaults: C<'-'> for dates and C<':'> for times.
>
> -The C method returns the C object for the
> +The C method returns the C object for the
> C object. The method C returns the offset from UTC, in
> seconds, of the C object according to the time zone.
>
> @@ -165,7 +165,7 @@
>
> The same methods exists for all the values you can set in the
> constructor: C, C, C, C, C, C,
> -C and C. Also, there's a C method, which
> +C and C. Also, there's a C method, which
> accepts all of these as named arguments, allowing several values to be
> set at once:
>
> @@ -175,12 +175,12 @@
> values, and an exception is thrown if the result isn't a sensible date
> and time.
>
> -If you use the C public accessor to adjust the time zone, the
> +If you use the C public accessor to adjust the time zone, the
> local time zone is adjusted accordingly:
>
> my $dt = DateTime.new('2005-02-01T15:00:00+0900');
> say $dt.hour; # 15
> - $dt.time_zone = '+0600';
> + $dt.timezone = '+0600';
> say $dt.hour; # 12
>
> The C method allows you to "clear" a number of time values
>
>
--
Mark J. Reed