What are some common uses for the datetime library?


#1

Question

What are some common uses for the datetime library?

Answer

If you’re a Pro member, you have access to a project coming up in lesson 8 where you make a calendar! There are tons of features you could add to the basic calendar project that use the datetime library, like adding an alert when the date of an event equals the current date, displaying how many days away an event is, all kinds of things!
Aside from that, the uses for it are bounded only by your creativity. Lots of applications need to perform actions at a certain time daily, weekly, annually, whatever the case may be. Using datetime to detect when to do something is a powerful tool!


FAQ: Learn Python - Date and Time - Pretty Time
#2

Years ago (around 1970) I worked with a 4GL (generation language) (NOMAD) that had clever date stuff and you could subtract dates and get how long between them – I will be curious to see if this is going to be available here as we progress.