#4329·date-fns

Support firstWeekContainsDate values other than 1 and 4

Author: NillDkCreated Sep 24, 2026Updated Sep 24, 2026

getDate accepts a firstWeekContainsDate option that determines which date is used to define the first week of the year.

Previously, it was possible to specify any value from 1 through 7:

firstWeekContainsDate: 1 | 2 | 3 | 4 | 5 | 6 | 7 In newer versions, this appears to be restricted to:

firstWeekContainsDate: 1 | 4

Our system uses a specific week-numbering convention where the first week is defined as the week containing the 3rd day of the year. Therefore, we need to be able to use:

firstWeekContainsDate: 3

Proposed change

Would it be possible to support firstWeekContainsDate values from 1 through 7 again, or otherwise provide a way to configure firstWeekContainsDate: 3?

Our use case is based on a deliberate business/calendar rule, rather than a mistake in the date calculation, so being able to configure this value is important for us.

Thanks!