diff options
Diffstat (limited to 'example.py')
-rw-r--r-- | example.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -3,13 +3,13 @@ from dateutil.easter import * from dateutil.rrule import * from dateutil.parser import * from datetime import * -import commands +import subprocess import os -now = parse(commands.getoutput("date")) +now = parse(subprocess.getoutput("date")) today = now.date() -year = rrule(YEARLY,bymonth=8,bymonthday=13,byweekday=FR)[0].year +year = rrule(YEARLY, bymonth=8, bymonthday=13, byweekday=FR)[0].year rdelta = relativedelta(easter(year), today) -print "Today is:", today -print "Year with next Aug 13th on a Friday is:", year -print "How far is the Easter of that year:", rdelta -print "And the Easter of that year is:", today+rdelta +print("Today is:", today) +print("Year with next Aug 13th on a Friday is:", year) +print("How far is the Easter of that year:", rdelta) +print("And the Easter of that year is:", today+rdelta) |