Module datetime :: Class datetime
[frames | no frames]

Type datetime

object --+    
         |    
      date --+
             |
            datetime


datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])

The year, month and day arguments are required. tzinfo may be None, or an instance of a tzinfo subclass. The remaining arguments may be ints or longs.
Method Summary
  astimezone(...)
tz -> convert to local time in new timezone tz
  ctime(...)
Return ctime() style string.
  date(...)
Return date object with same year, month and day.
  dst(...)
Return self.tzinfo.dst(self).
  isoformat(...)
[sep] -> string in ISO 8601 format, YYYY-MM-DDTHH:MM:SS[.mmmmmm][+HH:MM].
  replace(...)
Return datetime with new specified fields.
  time(...)
Return time object with same time but with tzinfo=None.
  timetuple(...)
Return time tuple, compatible with time.localtime().
  timetz(...)
Return time object with same time and tzinfo.
  tzname(...)
Return self.tzinfo.tzname(self).
  utcoffset(...)
Return self.tzinfo.utcoffset(self).
  utctimetuple(...)
Return UTC time tuple, compatible with time.localtime().
    Inherited from date
  isocalendar(...)
Return a 3-tuple containing ISO year, week number, and weekday.
  isoweekday(...)
Return the day of the week represented by the date.
  strftime(...)
format -> strftime() style string.
  toordinal(...)
Return proleptic Gregorian ordinal.
  weekday(...)
Return the day of the week represented by the date.
    Inherited from type
  combine(...)
date, time -> datetime with same date and time fields
  fromordinal(...)
int -> date corresponding to a proleptic Gregorian ordinal.
  fromtimestamp(...)
timestamp[, tz] -> tz's local time from POSIX timestamp.
  now(...)
[tz] -> new datetime with tz's local day and time.
  today(...)
Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
  utcfromtimestamp(...)
timestamp -> UTC datetime from a POSIX timestamp (like time.time()).
  utcnow(...)
Return a new datetime representing UTC day and time.

Class Variable Summary
getset_descriptor hour = <attribute 'hour' of 'datetime.datetime' objects>
datetime max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999...
getset_descriptor microsecond = <attribute 'microsecond' of 'datetime.date...
datetime min = datetime.datetime(1, 1, 1, 0, 0)
getset_descriptor minute = <attribute 'minute' of 'datetime.datetime' obje...
timedelta resolution = datetime.timedelta(0, 0, 1)
getset_descriptor second = <attribute 'second' of 'datetime.datetime' obje...
getset_descriptor tzinfo = <attribute 'tzinfo' of 'datetime.datetime' obje...
    Inherited from date
getset_descriptor day = <attribute 'day' of 'datetime.date' objects>
getset_descriptor month = <attribute 'month' of 'datetime.date' objects>
getset_descriptor year = <attribute 'year' of 'datetime.date' objects>

Method Details

astimezone(...)

tz -> convert to local time in new timezone tz

ctime(...)

Return ctime() style string.
Overrides:
datetime.date.ctime

date(...)

Return date object with same year, month and day.

dst(...)

Return self.tzinfo.dst(self).

isoformat(...)

[sep] -> string in ISO 8601 format, YYYY-MM-DDTHH:MM:SS[.mmmmmm][+HH:MM].

sep is used to separate the year from the time, and defaults to 'T'.
Overrides:
datetime.date.isoformat

replace(...)

Return datetime with new specified fields.
Overrides:
datetime.date.replace

time(...)

Return time object with same time but with tzinfo=None.

timetuple(...)

Return time tuple, compatible with time.localtime().
Overrides:
datetime.date.timetuple

timetz(...)

Return time object with same time and tzinfo.

tzname(...)

Return self.tzinfo.tzname(self).

utcoffset(...)

Return self.tzinfo.utcoffset(self).

utctimetuple(...)

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

Class Variable Details

hour

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

max

Type:
datetime
Value:
datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)                    

microsecond

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

min

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

minute

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

resolution

Type:
timedelta
Value:
datetime.timedelta(0, 0, 1)                                            

second

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

tzinfo

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

Generated by Epydoc 2.1 on Thu Oct 19 03:18:13 2006 http://epydoc.sf.net