Related modules
-
datetime module :
datetime
The module provides classes for date and time.date
Class: represents date (year, month, day).time
Class: Represents time (hours, minutes, seconds, microseconds).datetime
Class: Represents date and time.
-
timedelta object :
timedelta
Represents the difference between two dates or times.- It can be used as a representation of date intervals, or to represent the length of a period of time.
-
strftime and strptime methods :
strftime
Method used todatetime
format an object into a string.strptime
Method for parsing date and time from string.
-
Other common methods :
now()
: Get the current date and time.today()
: Get the current date (without time part).utcnow()
: Gets the current Coordinated Universal Time (UTC) date and time.
-
Time zone related content :
- Python provides tools for handling time zones, including time