class DateUtils2 {

	public long expireAtWeek(int addWeek, int atWeekDay, int atHour, int atMin) {
		long curTime = System.currentTimeMillis();
		Calendar calendar = Calendar.getInstance();
		calendar.add(Calendar.DATE, 7 * addWeek);
		calendar.set(Calendar.DAY_OF_WEEK, atWeekDay == 7 ? 1 : atWeekDay + 1);
		calendar.set(Calendar.HOUR_OF_DAY, atHour);
		calendar.set(Calendar.MINUTE, atMin);
		long result = (calendar.getTimeInMillis() - curTime) / 1000;
		return result;
	}

}