Here you can find the source of getFirstDayOfWeek(Date date)
public static Date getFirstDayOfWeek(Date date)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Date getFirstDayOfWeek(int year, int week) { week = week - 1;//from w w w . j a va 2s .com Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.MONTH, Calendar.JANUARY); calendar.set(Calendar.DATE, 1); Calendar cal = (Calendar) calendar.clone(); cal.add(Calendar.DATE, week * 7); return getFirstDayOfWeek(cal.getTime()); } public static Date getFirstDayOfWeek(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setFirstDayOfWeek(Calendar.SUNDAY); calendar.setTime(date); calendar.set(Calendar.DAY_OF_WEEK, calendar.getFirstDayOfWeek()); // Sunday return calendar.getTime(); } }