/** * @param timeZone The time zone to use for this Calendar, <code>null</code> * if <code>{@link TimeZone#getDefault()}</code> should be used */ public BaseCalendar(Calendar baseCalendar, TimeZone timeZone) { setBaseCalendar(baseCalendar); setTimeZone(timeZone); }
public WeeklyCalendar(Calendar baseCalendar, TimeZone timeZone) { super(baseCalendar, timeZone); excludeDays[java.util.Calendar.SUNDAY] = true; excludeDays[java.util.Calendar.SATURDAY] = true; excludeAll = areAllDaysExcluded(); }
/** * @param timeZone The time zone to use for this Calendar, <code>null</code> * if <code>{@link TimeZone#getDefault()}</code> should be used */ public BaseCalendar(TimeZone timeZone) { setTimeZone(timeZone); }
/** * <p> * Determine whether the given time (in milliseconds) is 'included' by the * Calendar. * </p> * * <p> * Note that this Calendar is only has full-day precision. * </p> */ @Override public boolean isTimeIncluded(long timeStamp) { // Test the base calendar first. Only if the base calendar not already // excludes the time/date, continue evaluating this calendar instance. if (super.isTimeIncluded(timeStamp) == false) { return false; } java.util.Calendar day = createJavaCalendar(timeStamp); return !(isDayExcluded(day)); }
/** * Remove the given day from the list of excluded days * * @param day the day to exclude */ public void removeExcludedDay(java.util.Calendar day) { removeExcludedDay(day, false); }
public MonthlyCalendar(Calendar baseCalendar, TimeZone timeZone) { super(baseCalendar, timeZone); // all days are included by default excludeAll = areAllDaysExcluded(); }
/** * <p> * Check if all days are excluded. That is no day is included. * </p> */ public boolean areAllDaysExcluded() { for (int i = 1; i <= MAX_DAYS_IN_MONTH; i++) { if (isDayExcluded(i) == false) { return false; } } return true; }
public BaseCalendar(Calendar baseCalendar) { setBaseCalendar(baseCalendar); }
@Override public Object clone() { DailyCalendar clone = (DailyCalendar) super.clone(); return clone; }
/** * @param timeZone The time zone to use for this Calendar, <code>null</code> * if <code>{@link TimeZone#getDefault()}</code> should be used */ public BaseCalendar(Calendar baseCalendar, TimeZone timeZone) { setBaseCalendar(baseCalendar); setTimeZone(timeZone); }
/** * <p> * Redefine a certain day of the week to be excluded (true) or included * (false). Use java.util.Calendar's constants like MONDAY to determine the * wday. * </p> */ public void setDayExcluded(int wday, boolean exclude) { excludeDays[wday] = exclude; excludeAll = areAllDaysExcluded(); }
/** * @param timeZone The time zone to use for this Calendar, <code>null</code> * if <code>{@link TimeZone#getDefault()}</code> should be used */ public BaseCalendar(TimeZone timeZone) { setTimeZone(timeZone); }
/** * Remove the given day from the list of excluded days * * @param day the day to exclude */ public void removeExcludedDay(java.util.Calendar day) { removeExcludedDay(day, false); }
public MonthlyCalendar(Calendar baseCalendar, TimeZone timeZone) { super(baseCalendar, timeZone); // all days are included by default excludeAll = areAllDaysExcluded(); }
/** * <p> * Check if all days are excluded. That is no day is included. * </p> */ public boolean areAllDaysExcluded() { for (int i = 1; i <= MAX_DAYS_IN_MONTH; i++) { if (isDayExcluded(i) == false) { return false; } } return true; }
public BaseCalendar(Calendar baseCalendar) { setBaseCalendar(baseCalendar); }
public WeeklyCalendar(Calendar baseCalendar, TimeZone timeZone) { super(baseCalendar, timeZone); excludeDays[java.util.Calendar.SUNDAY] = true; excludeDays[java.util.Calendar.SATURDAY] = true; excludeAll = areAllDaysExcluded(); }
/** * <p> * Redefine a certain day of the week to be excluded (true) or included * (false). Use java.util.Calendar's constants like MONDAY to determine the * wday. * </p> */ public void setDayExcluded(int wday, boolean exclude) { excludeDays[wday] = exclude; excludeAll = areAllDaysExcluded(); }
/** * <p> * Redefine the array of days excluded. The array must of size greater or * equal 8. java.util.Calendar's constants like MONDAY should be used as * index. A value of true is regarded as: exclude it. * </p> */ public void setDaysExcluded(boolean[] weekDays) { if (weekDays == null) { return; } excludeDays = weekDays; excludeAll = areAllDaysExcluded(); }
/** * <p> * Redefine the array of days excluded. The array must of size greater or * equal 8. java.util.Calendar's constants like MONDAY should be used as * index. A value of true is regarded as: exclude it. * </p> */ public void setDaysExcluded(boolean[] weekDays) { if (weekDays == null) { return; } excludeDays = weekDays; excludeAll = areAllDaysExcluded(); }