how to get last day of the month in java code example
Example 1: Get the last Friday of a month in Java
LocalDate now = LocalDate.now();
LocalDate lastFriday = now.with(TemporalAdjusters.lastInMonth(DayOfWeek.FRIDAY));
Example 2: Get the last day of a month in Java
LocalDate now = LocalDate.now();
LocalDate lastDay = now.with(TemporalAdjusters.lastDayOfMonth());