A class that contains the data needed to represent a single point in time
using many different date and time formats.
- __cmp__(self, other)
- __hash__(self)
- __init__(self, year, month, day, hour, minute, second, milliSecond, daylightSavings, tzName, tzHourOffset, tzMinuteOffset)
- __str__ = asISO8601DateTime(self, local=0)
-
Represents this DT object as an ISO 8601 date-time string, using
UTC time like '2001-01-01T00:00:00Z' if local=0, or local time with
UTC offset like '2000-12-31T17:00:00-07:00' if local=1.
- abbreviatedMonthName(self, local=0)
-
Returns the month component of the stored date and time as a
string like 'Jan'.
- asISO8601Date(self, local=0)
-
Represents this DT object as an ISO 8601 date-time string, like
'2001-01-01' if local=0, or '2000-12-31' if local=1. The local date
may vary from UTC date depending on the time of day that is stored
in the object.
- asISO8601DateTime(self, local=0)
-
Represents this DT object as an ISO 8601 date-time string, using
UTC time like '2001-01-01T00:00:00Z' if local=0, or local time with
UTC offset like '2000-12-31T17:00:00-07:00' if local=1.
- asISO8601Time(self, local=0)
-
Represents this DT object as an ISO 8601 time string, using UTC
time like 'T00:00:00Z' if local=0, or local time with UTC offset
like 'T17:00:00-07:00' if local=1
- asPythonTime(self, local=0)
-
Returns the stored date and time as a float indicating the number
of seconds since the local machine's epoch.
- asPythonTimeTuple(self, local=0)
-
Returns the stored date and time as a Python time tuple, as
documented in the time module. If the tuple is going to be passed
to a function that expects the local time, set local=1. The
Daylight Savings flag is always -1, which means unknown, and may
or may not have ramifications.
- asRFC822DateTime(self, local=0)
-
Represents this DT object as an RFC 1123 (which updated RFC 822)
date string, using UTC time like 'Mon, 01 Jan 2001 00:00:00 GMT' if
local=0, or local time with time zone indicator or offset like
'Sun, 31 Dec 2000 17:00:00 MDT' if local=1. Although RFC 822 allows
the weekday to be optional, it is always included in the returned
string.
- day(self, local=0)
-
Returns the day component of the stored date and time as an
integer in the range 1-31.
- dayOfWeek(self, local=0)
-
Returns the day of week component of the stored date and time
as an int in the range 0-6 (0=Monday).
- dayOfYear(self, local=0)
-
Returns the day of year component of the stored date and time
as an int in the range 1-366.
- hour(self, local=0)
-
Returns the hour component of the stored date and time as an int
in the range 0-23.
- milliSecond(self)
-
Returns the millisecond component of the stored date and time as
an int in the range 0-999.
- minute(self, local=0)
-
Returns the minute component of the stored date and time as an
int in the range 0-59.
- month(self, local=0)
-
Returns the month component of the stored date and time as an int
in the range 0-11.
- monthName(self, local=0)
-
Returns the month component of the stored date and time as a
string like 'January'.
- second(self)
-
Returns the second component of the stored date and time as an
int in the range 0-59.
- tzHourOffset(self)
-
Returns the local time's hour offset from GMT component of the
stored date and time as an int, typically in the range -12 to 14.
- tzMinuteOffset(self)
-
Returns the local time's minute offset from GMT component of the
stored date and time as an int in the range 0-59.
- tzName(self)
-
Returns the local time's time zone name component of the stored
date and time as a string like 'MST'.
- year(self, local=0)
-
Returns the year component of the stored date and time as an int
like 2001.