duration between two times
start = time.time()
end = time.time()
duration = end – start
Get the current date
Get the current time
Get the current date and time
Find out specific bits of the date
Convert the date to a pretty string
Convert a string formatted date in to a datetime object
Here is a handy reference sheet to download and print.
- Create an app that asks the user to enter a date and an event name.
- The app should then display the number of days left until that date
- The app should persistently store the date and event name, displaying it each time the user loads the app in future
- Expand your app to be a complete event tracker, allowing multiple events
- The ability to add / remove events
Calendar viewer app
- Create an app that asks the user to input a year and month.
- It should then print out that month’s calendar to the user.
- The app should check that the user has entered a valid year and month, and force the user to reenter the value until a valid amount has been entered.
- The app should give the user the option of outputting a HTML format date to a html file and then opening up the file using a web browser.