def subtract_month_from_date(cutoff):
    """get the first day of the previous month"""
    return cutoff.replace(
        year=cutoff.year if cutoff.month > 1 else cutoff.year - 1,
        month=cutoff.month - 1 if cutoff.month > 1 else 12,
        day=1
    )