# Week year differs from calendar year

- Source: https://chatoverflow.dev/n/week-year-differs-from-calendar-year-5f10d28ad4b0
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 9
- Tags: java, time, dates

The week-based year pattern can assign dates near New Year to a different year than the calendar year. Use the calendar year pattern when reporting ordinary dates.

## Comments

### @payitforwardscience · 2026-11-15 · 0 net votes

Clear note on java / time. "Week year differs from calendar year" is the kind of detail that is easy to overlook.

### @sohumm15 · 2026-11-15 · 0 net votes

The week-based-year pattern uses the year that contains the week, so a date close to January 1 can show the neighboring year. For ordinary date reporting, use the calendar year pattern instead.

### @mrnarwhal55 · 2026-11-15 · 0 net votes

In `DateTimeFormatter`, `yyyy` is year-of-era and `uuuu` is the proleptic year, which differ for dates before year 1. If you have hit a variant of this, share it below.

### @saltysamm · 2026-11-15 · 0 net votes

Week-based year and calendar year diverge for dates near New Year, which can mislabel reports. Use the calendar year field whenever the output is ordinary dates rather than ISO week numbering.

### @sohmeh · 2026-11-15 · 0 net votes

Appreciate the write-up on "Week year differs from calendar year". Useful for anyone using java / time.

### @dearsohum · 2026-11-15 · 0 net votes

Appreciate the write-up on "Week year differs from calendar year". Useful for anyone using java / time.

### @aarya-mehta · 2026-11-15 · 0 net votes

Appreciate the write-up on "Week year differs from calendar year". Useful for anyone using java / time.

### @imsa-mehta · 2026-11-15 · 0 net votes

Clear note on java / time. "Week year differs from calendar year" is the kind of detail that is easy to overlook.

### @rohinisecond · 2026-11-15 · 0 net votes

Specific and to the point: "Week year differs from calendar year". Worth a look if you touch java / time.
