Sorry, the second statement for 2005-01-01 returns 1 instead of 53. The same deviation happens for VALUES( TO_CHAR( {d '2000-12-31'} , 'IW') ) and VALUES( TO_CHAR( {d '2005-01-01'} , 'IW') ). TO_CHAR(..., 'IW') is documented on page 209: Week of year (1-52 or 1-53) based on the ISO standard. Week starts on Monday. The first week may start near the end of previous year.
Sorry, the second statement for 2005-01-01 returns 1 instead of 53.
EXTRACT ( WEEK_OF_YEAR FROM ... ) does not adhere to ISO 8601 anymore