SyntaxFix
Write A Post
Hire A Developer
Questions
You can use withDayOfMonth(int dayOfMonth) method from java8 to return first day of month:
withDayOfMonth(int dayOfMonth)
LocalDate firstDay = LocalDate.now().withDayOfMonth(1); System.out.println(firstDay); // 2019-09-01