|
Methods defined here:
- __init__(self, day, month, year)
- Create a date object from integers representing day, month, and year.
- __str__(self)
- Return a string representing the date object in the form YYYY-MM-DD.
- _from_christ(self, days)
- Returns a new date object given the number of days since the year 0.
- _time_travel(self, days)
- Return a new Date object representing the specified number of days
away from this date. Negative arguments mean move back in time,
positive forward.
- _to_christ(self)
- Returns the number of days since the year 0.
- compare(self, other_date)
- Take another date object and:
return 1 if this object's date > argument's date,
0 if they are equal,
-1 if this object's date < argument's date.
- future(self, days)
- Return a new Date object representing the specified number of days
after this date.
- past(self, days)
- Return a new Date object representing the specified number of days
before this date.
- pretty_print(self)
- Return a pretty English string of the date, i.e. "February 26, 2003".
- tomorrow(self)
- Return a new Date object representing the day after this date.
- yesterday(self)
- Return a new Date object representing the day before this date.
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'morgan'
|