mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2024-11-16 01:07:26 +00:00
Create Birthday_counter.py
This commit is contained in:
parent
4da95e9a22
commit
9665640794
22
code/Birthday_counter.py
Normal file
22
code/Birthday_counter.py
Normal file
@ -0,0 +1,22 @@
|
||||
import datetime
|
||||
now = datetime.datetime.now()
|
||||
print "-" * 25
|
||||
print now
|
||||
print now.year
|
||||
print now.month
|
||||
print now.day
|
||||
print now.hour
|
||||
print now.minute
|
||||
print now.second
|
||||
|
||||
print "-" * 25
|
||||
print "1 week ago was it: ", now - datetime.timedelta(weeks=1)
|
||||
print "100 days ago was: ", now - datetime.timedelta(days=100)
|
||||
print "1 week from now is it: ", now + datetime.timedelta(weeks=1)
|
||||
print "In 1000 days from now is it: ", now + datetime.timedelta(days=1000)
|
||||
|
||||
print "-" * 25
|
||||
birthday = datetime.datetime(2012,11,04)
|
||||
|
||||
print "Birthday in ... ", birthday - now
|
||||
print "-" * 25
|
Loading…
Reference in New Issue
Block a user