The topic today is datetime which makes me think of life. Maybe, music is a mataphor of life.
1 2 3 4 5 6 7
| import datetime
t = datetime.date(2017, 4, 4) t.isoweekday() t.isoformat()
one_day = datetime.timedelta(days=1)
|
Other things useless (maybe not) you could find on
https://docs.python.org/3/library/datetime.html
1 2 3 4 5 6 7 8 9 10 11 12
| import time from datetime import date
today = date.today() today == date.fromtimestamp(time.time()) my_birthday = date(today.year, 6, 24)
if my_birthday < today: my_birthday = my_birthday.replace(year=today.year + 1)
time_to_birthday = abs(my_birthday - today) time_to_birthday.days
|
You could always find the manual. That’s enough for today.