I just noticed a possible issue with formatting weeks in year. If I try to format a date ("12/31/06") to "yyyy-ww" format, I get "2006-01", which is totally unexpected. It looks like the week is limited to a value of 1-52. Even with that, it should consider it as "2007-01". This is not good, since this is often used for SQL querying and most DB's use the 01-53 week range. Has anyone seen this? Can you duplicate it?
Here's my code:
private static final SimpleDateFormat wkYrFmt = new SimpleDateFormat("yyyy-ww");
private static final SimpleDateFormat monDayYrFmt = new SimpleDateFormat("MM-dd-yy");
System.out.println(wkYrFmt.format(monDayYrFmt.parse("12-31-06")));