public static Timestamp getWeekStart(Timestamp stamp, int daysLater, TimeZone timeZone, Locale locale) {
return getWeekStart(stamp, daysLater, 0, timeZone, locale);
}
public static Timestamp getWeekStart(Timestamp stamp, int daysLater, int weeksLater, TimeZone timeZone, Locale locale) {
Calendar tempCal = toCalendar(stamp, timeZone, locale);
tempCal.set(tempCal.get(Calendar.YEAR), tempCal.get(Calendar.MONTH), tempCal.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
tempCal.add(Calendar.DAY_OF_MONTH, daysLater);
tempCal.set(Calendar.DAY_OF_WEEK, tempCal.getFirstDayOfWeek());
tempCal.add(Calendar.WEEK_OF_MONTH, weeksLater);
Timestamp retStamp = new Timestamp(tempCal.getTimeInMillis());
retStamp.setNanos(0);
return retStamp;
}