Example usage for java.time DayOfWeek SUNDAY

List of usage examples for java.time DayOfWeek SUNDAY

Introduction

In this page you can find the example usage for java.time DayOfWeek SUNDAY.

Prototype

DayOfWeek SUNDAY

To view the source code for java.time DayOfWeek SUNDAY.

Click Source Link

Document

The singleton instance for the day-of-week of Sunday.

Usage

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());
}