If the date were 2016-01-01 and you compared it with what week Postgres thinks it is, you'd get:
SELECT date_part('week', '2016-01-01'::date); date_part ----------- 53 (1 row)
Edit: Actually, 2017-01-01 is week 52 according to Postgres, probably because it uses Monday as the first day of the week.
Just like imperial system, only a couple of weirdos do that.
If the date were 2016-01-01 and you compared it with what week Postgres thinks it is, you'd get:
This is because 2016-01-01 is still the 53rd week of 2015.Edit: Actually, 2017-01-01 is week 52 according to Postgres, probably because it uses Monday as the first day of the week.