NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 593 - Week 53 is sometimes an error
Week 53 is sometimes an error
Classification: Unclassified
Component: HTML5 schema
All All
: P2 minor
Assigned To: Nobody
Depends on:
  Show dependency treegraph
Reported: 2009-07-14 13:02 CEST by Smylers
Modified: 2011-05-25 12:51 CEST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Smylers 2009-07-14 13:02:54 CEST
Some years (such as 2009) have a week 53, while others (such as 2008) don't.  The value for <input type=week> must be a valid week string, which can only end in W53 for years with 53 weeks. appears always to treat W53 as valid, regardless of the year; it should instead take the weekday of the first day of the year into account and only allow W53 if the year starts on a Thursday or is a leap year that starts on a Friday:
Comment 1 Smylers 2009-07-14 13:03:20 CEST
Comment 2 Henri Sivonen 2011-05-19 17:46:33 CEST
AFAICT, the code that tries to do the right thing ends up saying week 53 is always *invalid*.
Comment 3 Henri Sivonen 2011-05-25 11:11:26 CEST
It appears that ICU4J is broken:

Fixed by not using ICU4J:

I hope the fix is correct. I'm not fully confident that it is. However, it is correct per citationless claims on Wikipedia.