Java examples for java.time:Month
Returns LocalDate date of the first day of month to which provided date belongs to.
//package com.java2s; import java.time.LocalDate; public class Main { /**//from w ww .jav a 2s .c o m * Returns {@link LocalDate} date of the first day of month to which provided {@code date} belongs to. */ public static LocalDate getMonthFirstDay(LocalDate date) { return date.withDayOfMonth(1); } }