32333435363738
cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, 0); if (cal.get(Calendar.MINUTE) % 2 > 0) { cal.add(Calendar.MINUTE, -1); } return new TimeMark(this, cal.getTime()); }
35363738394041
cal.set(Calendar.HOUR_OF_DAY, 0); int rem = (cal.get(Calendar.DAY_OF_WEEK) - Calendar.MONDAY + 7) % 7; if (rem > 0) { cal.add(Calendar.DATE, -rem); } return new TimeMark(this, cal.getTime()); }
cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.DAY_OF_MONTH, 1); return new TimeMark(this, cal.getTime()); }
31323334353637
cal.setTime(date); cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.HOUR_OF_DAY, 0); return new TimeMark(this, cal.getTime()); }
29303132333435
@Override public IMark<Date> previousMark(Date date) { cal.setTime(date); cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, 0); return new TimeMark(this, cal.getTime()); }
36373839404142
cal.set(Calendar.DAY_OF_MONTH, 1); int rem = cal.get(Calendar.MONTH) % 3; if (rem > 0) { cal.add(Calendar.MONTH, -rem); } return new TimeMark(this, cal.getTime()); }
33343536373839
cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); if (cal.get(Calendar.HOUR_OF_DAY) % 2 > 0) { cal.add(Calendar.HOUR_OF_DAY, -1); } return new TimeMark(this, cal.getTime()); }
cal.set(Calendar.SECOND, 0); int rem = cal.get(Calendar.MINUTE) % 30; if (rem > 0) { cal.add(Calendar.MINUTE, -rem); } return new TimeMark(this, cal.getTime()); }
cal.set(Calendar.SECOND, 0); int rem = cal.get(Calendar.MINUTE) % 10; if (rem > 0) { cal.add(Calendar.MINUTE, -rem); } return new TimeMark(this, cal.getTime()); }
34353637383940
cal.set(Calendar.MINUTE, 0); int rem = cal.get(Calendar.HOUR_OF_DAY) % 4; if (rem > 0) { cal.add(Calendar.HOUR_OF_DAY, -rem); } return new TimeMark(this, cal.getTime()); }