code: private static int weekRange(int weekBasedYear) {
          LocalDate date = LocalDate.of(weekBasedYear, 1, 1);
          // 53 weeks if year starts on Thursday, or Wed in a leap year
          if (date.getDayOfWeek() == THURSDAY || (date.getDayOfWeek() == WEDNESDAY && date.isLeapYear())) {
              return 53;
          }
          return 52;
      }
docs: from IsoFields in ThreeTen-Backport