The datetime class has several attributes pertaining to date, time and timezone information. Here is the list of class attributes and instance attributes:
Class attributes of Python datetime class |
|
min
|
A date time instance representing the date 01Jan01-00:00:00 - the minimum Gregorian proleptic Date. |
max
|
The maximum Gregorian date which is 31Dec9999-24:59:59-999999. |
resolution
|
|
Instance attributes of Python datetime class |
|
year |
Valid values for the year are from 1 to 9999. |
month |
Valid values for the month are from 1 to 12. |
day |
Valid values for the day are as per the number of days for that specific month as calculated by the Gregorian Calendar. |
hour |
Valid values for hour are from 0 to 23. |
minute |
Valid values for minute are from 0 to 59. |
second |
Valid values for second are from 0 to 59. |
microsecond |
Valid values for microsecond are from 0 to 999999. |
tzinfo |
An instance of a class derived from tzinfo, which provides time zone information. |
fold |
a fold in time for the length of 1 hour. The Theflagtells whether at least one fold has happened. For countries that do not follow daylight saving time should be zero. |