Here you can find the source of weekStart(Date date)
public static Date weekStart(Date date)
//package com.java2s; /*//from w w w.ja va 2 s . c om * Copyright (C) 2009-2014 StackFrame, LLC * This code is licensed under GPLv2. */ import java.util.Calendar; import java.util.Date; public class Main { public static Date weekStart(Date date) { Calendar startDate = Calendar.getInstance(); startDate.setTime(date); // Roll back to previous Saturday if not already on a Saturday. int day = startDate.get(Calendar.DAY_OF_WEEK); if (day != Calendar.SATURDAY) { startDate.add(Calendar.DATE, -day); } return startDate.getTime(); } }