A date range is a period in time. By default, a date range begins with negative infinity and ends with infinity.
def __cmp__(self, other):
Compares the start date of two date ranges. If the two date ranges have the
same start date, compares the end date.
Constructs a date range. By default, the start date is the bottomless past
and the end date is the endless future. This allows us to define date ranges
from a given point to the end of time, or from the beginning of time to a given
point.
Formats the receiver as a string (two new standard format dates seperated by
a dash.
Returns true if the records are "aligned" - that is, if the start date of one
matches the end date of the other.
Returns the end date.
Returns the start date.
Returns true if the date range includes the given date. In keeping with the
spirit of date ranges, inclusion is defined as being greater than or equal to
the start date but less than the end date.
Returns true if the receiver date range overlaps with the other date
range.
Resets the end Date.
Resets the start Date.
Returns a date range that is the union of the periods defined by self and
other, or None if the two periods do not overlap.
__init__(self, startDate, endDate)
def __init__(self,
startDate = Date(foreverPast = 1),
endDate = Date(foreverFuture = 1)):
__str__(self)
def __str__(self):
alignedWith(self, other)
def alignedWith(self, other):
getEnd(self)
def getEnd(self):
getStart(self)
def getStart(self):
includes(self, date)
def includes(self, date):
overlap(self, other)
def overlap(self, other):
setEnd(self, end)
def setEnd(self, end):
setStart(self, start)
def setStart(self, start):
union(self, other)
def union(self, other):