30313233343536
public IMark<Date> previousMark(Date date) { cal.setTime(date); cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); return new TimeMark(this, cal.getTime()); }
33343536373839
cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.DAY_OF_MONTH, 1); cal.set(Calendar.MONTH, 0); return new TimeMark(this, cal.getTime()); }
cal.set(Calendar.SECOND, 0); int rem = cal.get(Calendar.MINUTE) % 5; if (rem > 0) { cal.add(Calendar.MINUTE, -rem); } return new TimeMark(this, cal.getTime()); }