java.util.Date: seven days ago
From exactly now: long DAY_IN_MS = 1000 * 60 * 60 * 24; new Date(System.currentTimeMillis() – (7 * DAY_IN_MS)) From arbitrary Date date: new Date(date.getTime() – (7 * DAY_IN_MS)) Edit: As pointed out in the other answers, does not account for daylight savings time, if that’s a factor. Just to clarify that limitation I was … Read more