java first day of week

Solutions on MaxInterview for java first day of week by the best coders in the world

showing results for - "java first day of week"
Paola
12 Feb 2018
1LocalDate now = LocalDate.now();
2
3LocalDate firstDayOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
Frieda
09 May 2017
1private static Date firstDayOfWeek(Date date) {
2   Calendar calendar = Calendar.getInstance();
3   calendar.setTime(date);
4   calendar.set(Calendar.DAY_OF_WEEK, 1);
5   return calendar.getTime();
6}