r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread pugs-commits
Author: Kodi
Date: 2010-07-15 14:18:15 +0200 (Thu, 15 Jul 2010)
New Revision: 31696

Modified:
   docs/Perl6/Spec/S32-setting-library/Temporal.pod
Log:
[S32/Temporal] Permit day-of-month on Dates.

Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod
===
--- docs/Perl6/Spec/S32-setting-library/Temporal.pod2010-07-15 12:12:31 UTC 
(rev 31695)
+++ docs/Perl6/Spec/S32-setting-library/Temporal.pod2010-07-15 12:18:15 UTC 
(rev 31696)
@@ -15,8 +15,8 @@
 
 Created: 19 Mar 2009
 
-Last Modified: 14 Jul 2010
-Version: 13
+Last Modified: 15 Jul 2010
+Version: 14
 
 The document is a draft.
 
@@ -246,6 +246,7 @@
 year
 month
 day
+day-of-month
 day-of-week
 week
 week-year



Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread Mark J. Reed
By analogy, I'd say week-of-year should work as well.

On Thu, Jul 15, 2010 at 8:18 AM,  pugs-comm...@feather.perl6.nl wrote:
 Author: Kodi
 Date: 2010-07-15 14:18:15 +0200 (Thu, 15 Jul 2010)
 New Revision: 31696

 Modified:
   docs/Perl6/Spec/S32-setting-library/Temporal.pod
 Log:
 [S32/Temporal] Permit day-of-month on Dates.

 Modified: docs/Perl6/Spec/S32-setting-library/Temporal.pod
 ===
 --- docs/Perl6/Spec/S32-setting-library/Temporal.pod    2010-07-15 12:12:31 
 UTC (rev 31695)
 +++ docs/Perl6/Spec/S32-setting-library/Temporal.pod    2010-07-15 12:18:15 
 UTC (rev 31696)
 @@ -15,8 +15,8 @@

     Created: 19 Mar 2009

 -    Last Modified: 14 Jul 2010
 -    Version: 13
 +    Last Modified: 15 Jul 2010
 +    Version: 14

  The document is a draft.

 @@ -246,6 +246,7 @@
     year
     month
     day
 +    day-of-month
     day-of-week
     week
     week-year





-- 
Mark J. Reed markjr...@gmail.com


Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread yary
On Thu, Jul 15, 2010 at 9:21 AM, Mark J. Reed markjr...@gmail.com wrote:
 By analogy, I'd say week-of-year should work as well.

Oof, is there a generally accepted for numbering weeks within a year?
A month's boundaries' always coincides with a day's boundary, but a
year only occasionally begins/ends on a week boundary. Come to think
of it, there isn't even consensus on what day of the week constitutes
a week start, even if Perl 6 has chosen a convention.

On the other hand, I won't complain about a week-of-year with a good
definition of how it handles weeks 0/1, 52/53. End user can choose to
use it or not. And I'm not too anxious to open up the whole calendar
choice can of worms.


Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread Mark J. Reed
 I was just proposing an alias for week it that clarifies what it is
the week *of*.  The rest of what you ask is already established in
Temporal.pm.

1.  week returns the week number in the ISO 8601 week calendar.  You
can find the spec by Googling, but in summary:
   a. weeks begin on Monday
   b. weeks are numbered 1 to 52 or 53
   c. week 1 is the first week containing at least four days of the
new calendar year

2. week-year returns the year number, based on boundaries defined by
the above principle.  For instance, week 1 of this year began on
January 4th, 2010, so on January 3rd, 2010, week-year would still
return 2009.

These are the same values returned by the %V and %G strftime(3)
conversion specifications, e.g. date +%GW%V on Unixlike systems.


 By analogy, I'd say week-of-year should work as well.

 Oof, is there a generally accepted for numbering weeks within a year?
 A month's boundaries' always coincides with a day's boundary, but a
 year only occasionally begins/ends on a week boundary. Come to think
 of it, there isn't even consensus on what day of the week constitutes
 a week start, even if Perl 6 has chosen a convention.

 On the other hand, I won't complain about a week-of-year with a good
 definition of how it handles weeks 0/1, 52/53. End user can choose to
 use it or not. And I'm not too anxious to open up the whole calendar
 choice can of worms.




-- 
Mark J. Reed markjr...@gmail.com


Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 7/15/10 12:21 , Mark J. Reed wrote:
 By analogy, I'd say week-of-year should work as well.

Wasn't the week stuff punted to a non-core module because there are too many
differences in how it's handled (week starts on Sunday in the US and Israel
and Monday elsewhere, differing notions of what first week of the year
means, etc.)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw/eegACgkQIn7hlCsL25UjvQCgn2pBiV9738xD3pw3UHna15/C
vW8An2GrniNl9AWg//l/Jx4foXqOXDMF
=RbhI
-END PGP SIGNATURE-


Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread yary
On Thu, Jul 15, 2010 at 2:13 PM, Brandon S Allbery KF8NH
allb...@ece.cmu.edu wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 7/15/10 12:21 , Mark J. Reed wrote:
 By analogy, I'd say week-of-year should work as well.

 Wasn't the week stuff punted to a non-core module because there are too many
 differences in how it's handled (week starts on Sunday in the US and Israel
 and Monday elsewhere, differing notions of what first week of the year
 means, etc.)

I had the same thought but as Mark pointed out, there is an ISO
standard for numbering weeks within a year, which is also implemented
by Unix-y systems. So that portion is defensible.

-y


Re: r31696 -[S32/Temporal] Permit day-of-month on Dates.

2010-07-15 Thread Mark J. Reed
More importantly, it's already in the spec!  All I proposed was an
alias to an existing attribute name.  If it gets dropped out of core,
that's fine, too.  But I'd like to see the longer name available, in
whatever module it shows up in...


On Thu, Jul 15, 2010 at 5:36 PM, yary not@gmail.com wrote:
 On Thu, Jul 15, 2010 at 2:13 PM, Brandon S Allbery KF8NH
 allb...@ece.cmu.edu wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 7/15/10 12:21 , Mark J. Reed wrote:
 By analogy, I'd say week-of-year should work as well.

 Wasn't the week stuff punted to a non-core module because there are too many
 differences in how it's handled (week starts on Sunday in the US and Israel
 and Monday elsewhere, differing notions of what first week of the year
 means, etc.)

 I had the same thought but as Mark pointed out, there is an ISO
 standard for numbering weeks within a year, which is also implemented
 by Unix-y systems. So that portion is defensible.

 -y




-- 
Mark J. Reed markjr...@gmail.com