This implementation of the Calendar may be used (you don't have to) as a
base class for more sophisticated one's. It merely implements the base
functionality required by each Calendar.
Regarded as base functionality is the treatment of base calendars. Base
calendar allow you to chain (stack) as much calendars as you may need. For
example to exclude weekends you may use WeeklyCalendar. In order to exclude
holidays as well you may define a WeeklyCalendar instance to be the base
calendar for HolidayCalendar instance.
Set a description for the Calendar instance - may be
useful for remembering/displaying the purpose of the calendar, though
the description has no meaning to Quartz.
public void
setTimeZone(TimeZone timeZone) Sets the time zone for which this Calendar will be resolved.
Returns the end of the given day java.util.Calendar.
This calculation will take the BaseCalendar
time zone into account if it is not null.
Parameters: timeInMillis - a time containing the desired date for the end-of-day time. A java.util.Calendar set to the end of the given day.
Utility method. Return a java.util.Calendar for timeStamp.
getNextIncludedTime
public long getNextIncludedTime(long timeStamp)(Code)
Determine the next time (in milliseconds) that is 'included' by the
Calendar after the given time. Return the original value if timeStamp is
included. Return 0 if all days are excluded.
Returns the start of the given day as a java.util.Calendar.
This calculation will take the BaseCalendar
time zone into account if it is not null.
Parameters: timeInMillis - A time containing the desired date for the start-of-day time A java.util.Calendar set to the start of the given day.
Returns the time zone for which this Calendar will be
resolved.
This Calendar's timezone, null if Calendar should use the TimeZone.getDefault
isTimeIncluded
public boolean isTimeIncluded(long timeStamp)(Code)
Check if date/time represented by timeStamp is included. If included
return true. The implementation of BaseCalendar simply calls the base
calendars isTimeIncluded() method if base calendar is set.
public void setBaseCalendar(Calendar baseCalendar)(Code)
Set a new base calendar or remove the existing one
setDescription
public void setDescription(String description)(Code)
Set a description for the Calendar instance - may be
useful for remembering/displaying the purpose of the calendar, though
the description has no meaning to Quartz.
Sets the time zone for which this Calendar will be resolved.
Parameters: timeZone - The time zone to use for this Calendar, null if TimeZone.getDefault should be used