Here you can find the source of getPreviousMonday(Date day)
public static Date getPreviousMonday(Date day)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getPreviousMonday(Date day) { Calendar previousMonday = Calendar.getInstance(); previousMonday.setTime(day);/*from w w w. j a va 2s.c om*/ previousMonday.set(Calendar.HOUR_OF_DAY, 0); previousMonday.set(Calendar.MINUTE, 0); previousMonday.set(Calendar.SECOND, 0); previousMonday.add(Calendar.DATE, -1); previousMonday.add(Calendar.WEEK_OF_MONTH, -1); previousMonday.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); return previousMonday.getTime(); } }