我希望根据LocalDate.now()得到一周中第一天的日期.使用JodaTime可以实现以下功能,但似乎已从Java 8中的新Date API中删除.
LocalDate now = LocalDate.now();
System.out.println(now.withDayOfWeek(DateTimeConstants.MONDAY));
Run Code Online (Sandbox Code Playgroud)
我不能称'withDayOfWeek()',因为它不存在.
所以我的问题是:如何根据一些LocalDate获取一周中第一天的日期?