int week = computeWeek(offset, doy);
if (week == 0) {
// Day is in end of week of previous year
// Recompute from the last day of the previous year
ChronoLocalDate date = Chronology.from(temporal).date(temporal);
date = date.minus(doy, DAYS); // Back down into previous year
return localizedWeekOfWeekBasedYear(date);
} else if (week > 50) {
// If getting close to end of year, use higher precision logic
// Check if date of year is in partial week associated with next year
ValueRange dayRange = temporal.range(DAY_OF_YEAR);