niemeyer | debf3cd | 2005-02-23 18:33:30 +0000 | [diff] [blame^] | 1 | from dateutil.relativedelta import * |
| 2 | from dateutil.easter import * |
| 3 | from dateutil.rrule import * |
| 4 | from dateutil.parser import * |
| 5 | from datetime import * |
| 6 | import commands |
| 7 | import os |
| 8 | now = parse(commands.getoutput("date")) |
| 9 | today = now.date() |
| 10 | year = rrule(YEARLY,bymonth=8,bymonthday=13,byweekday=FR)[0].year |
| 11 | rdelta = relativedelta(easter(year), today) |
| 12 | print "Today is:", today |
| 13 | print "Year with next Aug 13th on a Friday is:", year |
| 14 | print "How far is the Easter of that year:", rdelta |
| 15 | print "And the Easter of that year is:", today+rdelta |