List of usage examples for java.time DayOfWeek SUNDAY
DayOfWeek SUNDAY
To view the source code for java.time DayOfWeek SUNDAY.
Click Source Link
From source file:nu.yona.server.analysis.service.ActivityService.java
private LocalDate getCurrentWeekDate(UserAnonymizedDto userAnonymized) { LocalDate currentDayDate = getCurrentDayDate(userAnonymized); if (currentDayDate.getDayOfWeek() == DayOfWeek.SUNDAY) { // take as the first day of week return currentDayDate; }/* ww w.j a v a 2 s. c o m*/ // MONDAY=1, etc. return currentDayDate.minusDays(currentDayDate.getDayOfWeek().getValue()); }