from datetime import date, datetime, timedelta
from dateutil.relativedelta import relativedelta

print("Retrieving date range...")

def prev_weekday(adate):
    adate -= timedelta(days=1)
    while adate.weekday() > 4:
        adate -= timedelta(days=1)
    return adate

todayDate = "2018-5-16"
todayDate = datetime.strptime(todayDate, "%Y-%m-%d").date()
startDate = todayDate + relativedelta(months=-3)
prevWeekday = prev_weekday(todayDate)

print(startDate, "-", todayDate, "\n")

ea301cd4f5da560c898385381e6dec33d417b217
<mask token>


def prev_weekday(adate):
    adate -= timedelta(days=1)
    while adate.weekday() > 4:
        adate -= timedelta(days=1)
    return adate


<mask token>

<mask token>
print('Retrieving date range...')


def prev_weekday(adate):
    adate -= timedelta(days=1)
    while adate.weekday() > 4:
        adate -= timedelta(days=1)
    return adate


<mask token>
print(startDate, '-', todayDate, '\n')

<mask token>
print('Retrieving date range...')


def prev_weekday(adate):
    adate -= timedelta(days=1)
    while adate.weekday() > 4:
        adate -= timedelta(days=1)
    return adate


todayDate = '2018-5-16'
todayDate = datetime.strptime(todayDate, '%Y-%m-%d').date()
startDate = todayDate + relativedelta(months=-3)
prevWeekday = prev_weekday(todayDate)
print(startDate, '-', todayDate, '\n')

from datetime import date, datetime, timedelta
from dateutil.relativedelta import relativedelta
print('Retrieving date range...')


def prev_weekday(adate):
    adate -= timedelta(days=1)
    while adate.weekday() > 4:
        adate -= timedelta(days=1)
    return adate


todayDate = '2018-5-16'
todayDate = datetime.strptime(todayDate, '%Y-%m-%d').date()
startDate = todayDate + relativedelta(months=-3)
prevWeekday = prev_weekday(todayDate)
print(startDate, '-', todayDate, '\n')

from datetime import date, datetime, timedelta
from dateutil.relativedelta import relativedelta

print("Retrieving date range...")

def prev_weekday(adate):
    adate -= timedelta(days=1)
    while adate.weekday() > 4:
        adate -= timedelta(days=1)
    return adate

todayDate = "2018-5-16"
todayDate = datetime.strptime(todayDate, "%Y-%m-%d").date()
startDate = todayDate + relativedelta(months=-3)
prevWeekday = prev_weekday(todayDate)

print(startDate, "-", todayDate, "\n")
