Skip to content

Instantly share code, notes, and snippets.

@insaneyilin
Last active March 8, 2020 07:27
Show Gist options
  • Save insaneyilin/1278b40ce45f7fa3c64ee15927b055fa to your computer and use it in GitHub Desktop.
Save insaneyilin/1278b40ce45f7fa3c64ee15927b055fa to your computer and use it in GitHub Desktop.
print today's date
#!/usr/bin/env python3
import time
import datetime
# change your birthday here
my_birthday = datetime.datetime(2000, 1, 1, 00, 00, 00)
dt_now = datetime.datetime.now()
print(dt_now)
print('UNIX timestamp: {}'.format(dt_now.timestamp()))
print('Week: {} / 52'.format(time.strftime('%W')))
print('You have lived {} days'.format((dt_now - my_birthday).days))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment