HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //proc/thread-self/root/usr/share/doc/python27-dateutil-2.1/example.py
from dateutil.relativedelta import *
from dateutil.easter import *
from dateutil.rrule import *
from dateutil.parser import *
from datetime import *
import subprocess
import os
now = parse(subprocess.getoutput("date"))
today = now.date()
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)