79523169

Date: 2025-03-20 13:59:47
Score: 0.5
Natty:
Report link

Corrected implementation:

public static LocalDate getMondayOfFirstIsoWeek(int year) {
  // January 4 is always within ISO Week 1 of the given year
  LocalDate jan4 = LocalDate.of(year, 1, 4); 
  // Get the Monday of the ISO week
  return jan4.with(DayOfWeek.MONDAY);
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Hermann.Gruber