public void removeExcludedDate(Date dateToRemove) { Date date = getStartOfDayJavaCalendar(dateToRemove.getTime()).getTime(); dates.remove(date); }
public void removeExcludedDate(Date dateToRemove) { Date date = getStartOfDayJavaCalendar(dateToRemove.getTime()).getTime(); dates.remove(date); }
/** * <p> * Add the given Date to the list of excluded days. Only the month, day and * year of the returned dates are significant. * </p> */ public void addExcludedDate(Date excludedDate) { Date date = getStartOfDayJavaCalendar(excludedDate.getTime()).getTime(); /* * System.err.println( "HolidayCalendar.add(): date=" + * excludedDate.toLocaleString()); */ this.dates.add(date); }
/** * <p> * Add the given Date to the list of excluded days. Only the month, day and * year of the returned dates are significant. * </p> */ public void addExcludedDate(Date excludedDate) { Date date = getStartOfDayJavaCalendar(excludedDate.getTime()).getTime(); /* * System.err.println( "HolidayCalendar.add(): date=" + * excludedDate.toLocaleString()); */ this.dates.add(date); }
/** * <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) { if (super.isTimeIncluded(timeStamp) == false) { return false; } Date lookFor = getStartOfDayJavaCalendar(timeStamp).getTime(); return !(dates.contains(lookFor)); }
/** * <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) { if (super.isTimeIncluded(timeStamp) == false) { return false; } Date lookFor = getStartOfDayJavaCalendar(timeStamp).getTime(); return !(dates.contains(lookFor)); }
/** * <p> * Determine the next time (in milliseconds) that is 'included' by the * Calendar after the given time. * </p> * * <p> * Note that this Calendar is only has full-day precision. * </p> */ @Override public long getNextIncludedTime(long timeStamp) { // Call base calendar implementation first long baseTime = super.getNextIncludedTime(timeStamp); if ((baseTime > 0) && (baseTime > timeStamp)) { timeStamp = baseTime; } // Get timestamp for 00:00:00 java.util.Calendar day = getStartOfDayJavaCalendar(timeStamp); while (isTimeIncluded(day.getTime().getTime()) == false) { day.add(java.util.Calendar.DATE, 1); } return day.getTime().getTime(); }
/** * <p> * Determine the next time (in milliseconds) that is 'included' by the * Calendar after the given time. * </p> * * <p> * Note that this Calendar is only has full-day precision. * </p> */ @Override public long getNextIncludedTime(long timeStamp) { // Call base calendar implementation first long baseTime = super.getNextIncludedTime(timeStamp); if ((baseTime > 0) && (baseTime > timeStamp)) { timeStamp = baseTime; } // Get timestamp for 00:00:00 java.util.Calendar day = getStartOfDayJavaCalendar(timeStamp); while (isTimeIncluded(day.getTime().getTime()) == false) { day.add(java.util.Calendar.DATE, 1); } return day.getTime().getTime(); }
public void removeExcludedDate(Date dateToRemove) { Date date = getStartOfDayJavaCalendar(dateToRemove.getTime()).getTime(); dates.remove(date); }
public void removeExcludedDate(Date dateToRemove) { Date date = getStartOfDayJavaCalendar(dateToRemove.getTime()).getTime(); dates.remove(date); }
/** * <p> * Add the given Date to the list of excluded days. Only the month, day and * year of the returned dates are significant. * </p> */ public void addExcludedDate(Date excludedDate) { Date date = getStartOfDayJavaCalendar(excludedDate.getTime()).getTime(); /* * System.err.println( "HolidayCalendar.add(): date=" + * excludedDate.toLocaleString()); */ this.dates.add(date); }
/** * <p> * Add the given Date to the list of excluded days. Only the month, day and * year of the returned dates are significant. * </p> */ public void addExcludedDate(Date excludedDate) { Date date = getStartOfDayJavaCalendar(excludedDate.getTime()).getTime(); /* * System.err.println( "HolidayCalendar.add(): date=" + * excludedDate.toLocaleString()); */ this.dates.add(date); }
/** * <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> */ public boolean isTimeIncluded(long timeStamp) { if (super.isTimeIncluded(timeStamp) == false) { return false; } Date lookFor = getStartOfDayJavaCalendar(timeStamp).getTime(); return !(dates.contains(lookFor)); }
/** * <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> */ public boolean isTimeIncluded(long timeStamp) { if (super.isTimeIncluded(timeStamp) == false) { return false; } Date lookFor = getStartOfDayJavaCalendar(timeStamp).getTime(); return !(dates.contains(lookFor)); }
/** * <p> * Determine the next time (in milliseconds) that is 'included' by the * Calendar after the given time. * </p> * * <p> * Note that this Calendar is only has full-day precision. * </p> */ public long getNextIncludedTime(long timeStamp) { // Call base calendar implementation first long baseTime = super.getNextIncludedTime(timeStamp); if ((baseTime > 0) && (baseTime > timeStamp)) { timeStamp = baseTime; } // Get timestamp for 00:00:00 java.util.Calendar day = getStartOfDayJavaCalendar(timeStamp); while (isTimeIncluded(day.getTime().getTime()) == false) { day.add(java.util.Calendar.DATE, 1); } return day.getTime().getTime(); }
/** * <p> * Determine the next time (in milliseconds) that is 'included' by the * Calendar after the given time. * </p> * * <p> * Note that this Calendar is only has full-day precision. * </p> */ public long getNextIncludedTime(long timeStamp) { // Call base calendar implementation first long baseTime = super.getNextIncludedTime(timeStamp); if ((baseTime > 0) && (baseTime > timeStamp)) { timeStamp = baseTime; } // Get timestamp for 00:00:00 java.util.Calendar day = getStartOfDayJavaCalendar(timeStamp); while (isTimeIncluded(day.getTime().getTime()) == false) { day.add(java.util.Calendar.DATE, 1); } return day.getTime().getTime(); }