Website hosting service by Active-Venture.com
  

 Back to Index

6.9.1 Available Types

 

class date
An idealized naive date, assuming the current Gregorian calendar always was, and always will be, in effect. Attributes: year, month, and day.

 

class time
An idealized time, independent of any particular day, assuming that every day has exactly 24*60*60 seconds (there is no notion of "leap seconds" here). Attributes: hour, minute, second, microsecond, and tzinfo.

 

class datetime
A combination of a date and a time. Attributes: year, month, day, hour, minute, second, microsecond, and tzinfo.

 

class timedelta
A duration expressing the difference between two date, time, or datetime instances to microsecond resolution.

 

class tzinfo
An abstract base class for time zone information objects. These are used by the datetime and time classes to provide a customizable notion of time adjustment (for example, to account for time zone and/or daylight saving time).

Objects of these types are immutable.

Objects of the date type are always naive.

An object d of type time or datetime may be naive or aware. d is aware if d.tzinfo is not None and d.tzinfo.utcoffset(d) does not return None. If d.tzinfo is None, or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns None, d is naive.

The distinction between naive and aware doesn't apply to timedelta objects.

Subclass relationships:

 

object
    timedelta
    tzinfo
    time
    date
        datetime
 

  

 

2002-2004 Active-Venture.com Webhosting Service

 

Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://python.org/doc/

 

Domain registration : Buy domain name or register domain name from $5.95/year only

 

Cheap domain registration : Register domain name or buy domain name, including free domain hosting services

 
  Active-Domain.com offers cheap domain registration, domain name transfer and domain search services