first Day Of Calendar as LocalDate - Java java.time

Java examples for java.time:Day

Description

first Day Of Calendar as LocalDate

Demo Code


//package com.java2s;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.YearMonth;

public class Main {
    private static final DayOfWeek FIRST_DAY_OF_WEEK = DayOfWeek.MONDAY;

    private static LocalDate firstDayOfCalendar(YearMonth month) {
        return month.atDay(1).with(FIRST_DAY_OF_WEEK);
    }/*from  w ww  .  j ava 2 s. c o m*/
}

Related Tutorials