/**
* 获得周几日期,上一周或下一周,依此类推
* @param week 指定周几
* @param whichWeek 那一周
* @return string 日期 年-月-日
*/
public static StringgetDayOfWhichWeek(DayOfWeek week, int whichWeek) {
LocalDate day = LocalDate.now().with(TemporalAdjusters.previous(week)).minusWeeks(whichWeek -1);
return day.toString();
}
网友评论