Python provides specialized modules for working with dates and times. One of the most popular modules for the same is the datetime
module.
With the datetime
module we can get the current date and time on our system.
We can also fetch details like the year, month and day from datetime.now()
.