Java 8 : Get week number since epoch time
问题 Given LocalDate I want to convert to week number since Epoch One way to do that is: LocalDate date = datePicker.getValue(); // input from your date picker Locale locale = Locale.US; int weekOfYear = date.get(WeekFields.of(locale).weekOfWeekBasedYear()); And X = find weeks since Epoch to prevYear And then result = X + weekOfYear Although someway we can find out "week number since epoch", is there clean solution to find it using Java 8 ? UPDATE: Even above solution wont work as one week(always