get first day of current month java code example
Example 1: Get the first Monday of a month in Java
LocalDate now = LocalDate.now();
LocalDate firstMonday = now.with(TemporalAdjusters.firstInMonth(DayOfWeek.MONDAY));
Example 2: Get the first day of the current month in Java
LocalDate now = LocalDate.now();
LocalDate firstDay = now.with(TemporalAdjusters.firstDayOfMonth());