Here you can find the source of getLastOfWeek(Calendar cal, int week)
public static Timestamp getLastOfWeek(Calendar cal, int week)
//package com.java2s; import java.sql.Timestamp; import java.util.Calendar; public class Main { public static Timestamp getLastOfWeek(Calendar cal, int week) { if (cal == null) { cal = Calendar.getInstance(); }/* w ww. jav a 2 s . c o m*/ cal.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY); cal.set(Calendar.HOUR_OF_DAY, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); cal.set(Calendar.MILLISECOND, 999); return new Timestamp(cal.getTimeInMillis()); } }