Module datetime :: Class date
[show private | hide private]
[frames | no frames]

Type date

object --+
         |
        date

Known Subclasses:
datetime

date(year, month, day) --> date object
Method Summary
  __add__(x, y)
x.__add__(y) <==> x+y
  __eq__(x, y)
x.__eq__(y) <==> x==y
  __ge__(x, y)
x.__ge__(y) <==> x>=y
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __gt__(x, y)
x.__gt__(y) <==> x>y
  __hash__(x)
x.__hash__() <==> hash(x)
  __le__(x, y)
x.__le__(y) <==> x<=y
  __lt__(x, y)
x.__lt__(y) <==> x<y
  __ne__(x, y)
x.__ne__(y) <==> x!=y
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __radd__(x, y)
x.__radd__(y) <==> y+x
(cls, state) __reduce__()
__reduce__() -> (cls, state)
  __repr__(x)
x.__repr__() <==> repr(x)
  __rsub__(x, y)
x.__rsub__(y) <==> y-x
  __str__(x)
x.__str__() <==> str(x)
  __sub__(x, y)
x.__sub__(y) <==> x-y
  ctime(...)
Return ctime() style string.
  isocalendar(...)
Return a 3-tuple containing ISO year, week number, and weekday.
  isoformat(...)
Return string in ISO 8601 format, YYYY-MM-DD.
  isoweekday(...)
Return the day of the week represented by the date.
  replace(...)
Return date with new specified fields.
  strftime(...)
format -> strftime() style string.
  timetuple(...)
Return time tuple, compatible with time.localtime().
  toordinal(...)
Return proleptic Gregorian ordinal.
  weekday(...)
Return the day of the week represented by the date.
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
    Inherited from type
  fromordinal(...)
int -> date corresponding to a proleptic Gregorian ordinal.
  fromtimestamp(...)
timestamp -> local date from a POSIX timestamp (like time.time()).
  today(...)
Current date or datetime: same as self.__class__.fromtimestamp(time.time()).

Class Variable Summary
getset_descriptor day = <attribute 'day' of 'datetime.date' objects>
date max = datetime.date(9999, 12, 31)
date min = datetime.date(1, 1, 1)
getset_descriptor month = <attribute 'month' of 'datetime.date' objects>
timedelta resolution = datetime.timedelta(1)
getset_descriptor year = <attribute 'year' of 'datetime.date' objects>

Method Details

__add__(x, y)
(Addition operator)

x.__add__(y) <==> x+y
Returns:
x+y

__eq__(x, y)
(Equality operator)

x.__eq__(y) <==> x==y
Returns:
x==y

__ge__(x, y)
(Greater-than-or-equals operator)

x.__ge__(y) <==> x>=y
Returns:
x>=y

__getattribute__(...)

x.__getattribute__('name') <==> x.name
Overrides:
__builtin__.object.__getattribute__

__gt__(x, y)
(Greater-than operator)

x.__gt__(y) <==> x>y
Returns:
x>y

__hash__(x)
(Hashing function)

x.__hash__() <==> hash(x)
Returns:
hash(x)
Overrides:
__builtin__.object.__hash__

__le__(x, y)
(Less-than-or-equals operator)

x.__le__(y) <==> x<=y
Returns:
x<=y

__lt__(x, y)
(Less-than operator)

x.__lt__(y) <==> x<y
Returns:
x<y

__ne__(x, y)

x.__ne__(y) <==> x!=y
Returns:
x!=y

__new__(T, S, ...)

T.__new__(S, ...) -> a new object with type S, a subtype of T
Returns:
a new object with type S, a subtype of T
Overrides:
__builtin__.object.__new__

__radd__(x, y)
(Right-side addition operator)

x.__radd__(y) <==> y+x
Returns:
y+x

__reduce__()

__reduce__() -> (cls, state)
Returns:
(cls, state)
Overrides:
__builtin__.object.__reduce__

__repr__(x)
(Representation operator)

x.__repr__() <==> repr(x)
Returns:
repr(x)
Overrides:
__builtin__.object.__repr__

__rsub__(x, y)

x.__rsub__(y) <==> y-x
Returns:
y-x

__str__(x)
(Informal representation operator)

x.__str__() <==> str(x)
Returns:
str(x)
Overrides:
__builtin__.object.__str__

__sub__(x, y)
(Subtraction operator)

x.__sub__(y) <==> x-y
Returns:
x-y

ctime(...)

Return ctime() style string.

isocalendar(...)

Return a 3-tuple containing ISO year, week number, and weekday.

isoformat(...)

Return string in ISO 8601 format, YYYY-MM-DD.

isoweekday(...)

Return the day of the week represented by the date. Monday == 1 ... Sunday == 7

replace(...)

Return date with new specified fields.

strftime(...)

format -> strftime() style string.

timetuple(...)

Return time tuple, compatible with time.localtime().

toordinal(...)

Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.

weekday(...)

Return the day of the week represented by the date. Monday == 0 ... Sunday == 6

Class Variable Details

day

Type:
getset_descriptor
Value:
<attribute 'day' of 'datetime.date' objects>                           

max

Type:
date
Value:
datetime.date(9999, 12, 31)                                            

min

Type:
date
Value:
datetime.date(1, 1, 1)                                                 

month

Type:
getset_descriptor
Value:
<attribute 'month' of 'datetime.date' objects>                         

resolution

Type:
timedelta
Value:
datetime.timedelta(1)                                                  

year

Type:
getset_descriptor
Value:
<attribute 'year' of 'datetime.date' objects>                          

Generated by Epydoc 2.1 on Thu Oct 20 15:30:29 2005 http://epydoc.sf.net