This is my user page. I'm going to use it to build docs I need that may then be worth moving elsewhere. To begin with...
Dates and Times
Python has two modules that relate to dates and times (that I know of so far):
- datetime
- time
These are reasonably well documented in the online material, but I have not so far found a page or site that pulls all the information about these modules together in one place so one can understand how they relate to each other. This section is an attempt at that. First, an overview of the modules.
datetime
The datetime module defines three classes:
- date - a date (year, month, day)
- time - a time within a day (hour, minute, second)
- datetime - combines a datetime.date and datetime.time
time
The time module defines one class:
- time - access to system time
I found myself confused by a couple of aspects of these modules:
- datetime.time and time.time are completely different despite sharing a name.
- 'datetime' is