get first day and last day of last month java code example
Example 1: Get the first day of the current month in Java
LocalDate now = LocalDate.now();
LocalDate firstDay = now.with(TemporalAdjusters.firstDayOfMonth());
Example 2: Get the last day of a month in Java
LocalDate now = LocalDate.now();
LocalDate lastDay = now.with(TemporalAdjusters.lastDayOfMonth());