[whatwg] [html5] Pre-Last Call Comments

Christoph Päper christoph.paeper at crissov.de
Sun Apr 5 13:10:28 PDT 2009


Giovanni Campagna:
> - The second paragraph in 2.4.5.6 is hard to understand because the
> verb is at the end. I would rewrite as
> "A week-year with a number *yr* has 53 weeks if corresponds to a  
> year *yr* in the proleptic Gregorian calendar that has a Thursday  
> as its first day (January 1st), or if *yr* where *yr* is a number  
> divisible by 400, or a number divisible by 4 but not by 100. In all  
> other cases it has 52 weeks"


| A week-year with a number $year that corresponds to a year $year in  
the
| proleptic Gregorian calendar that has a Thursday as its first day
| (January 1st), and a week-year $year where $year is a number divisible
| by 400, or a number divisible by 4 but not by 100, has 53 weeks. All
| other week-years have 52 weeks.

The description is wrong anyhow: Not every leap year has 53 weeks!  
(For instance, 2008 and 2012 have 52 weeks only.) The difference to  
common years is that leap years with 53 weeks can have Jan01 on  
either Thu or Wed, because Dec31 then is Fri or Thu respectively.  
(Compare your 2020 to your 2004 calendar.)

: A week-year has 52 weeks, except it has 53 weeks when 1 January in the
: Gregorian year of the corresponding number $year falls on a Thursday,
: or it falls on a Wednesday and $year is a leap year.

   "1 January"   = "the first day of the first month" (-01-01, -001)
   "a Thursday"  = "the fourth day of the week" (-4)
   "a Wednesday" = "the third day of the week" (-3)
   "leap year"   = "number divisible by 4 but not by 100 or a number  
divisible by 400"

Or just reference and rely on ISO 8601. That is what references  
(especially to standards) are for after all.

By the way, because there is an even number of weeks in a Gregorian  
400-year cycle, the 53-week years (after the epoch) are:

   400 * n + a; n e |N°, a c L
   L := {004, 009, 015, 020, 026, 032, 037, 043, 048, 054, 060, 065,
         071, 076, 082, 088, 093, 099, 105, 111, 116, 122, 128, 133,
         139, 144, 150, 156, 161, 167, 172, 184, 189, 195, 201, 207,
         212, 218, 224, 229, 235, 240, 246, 252, 257, 263, 268, 274,
         280, 285, 291, 296, 303, 304, 308, 314, 320, 325, 331, 336,
         342, 348, 353, 359, 364, 370, 376, 381, 387, 392, 398}

That is 71 leap-week years opposed to 97 leap-day years.

PS: All complications are the fault of the month calendar, not of the  
week calendar.


More information about the whatwg mailing list