def METHOD_NAME(date_from, date_to):
    if (
        date_from.year == date_to.year
        and date_from.month == date_to.month
        and date_from.day == date_to.day
    ):
        return str(_date(date_from, "N jS, Y"))
    if date_from.year == date_to.year and date_from.month == date_to.month:
        return "{} – {}".format(_date(date_from, "N jS"), _date(date_to, "jS, Y"))
    if date_from.year == date_to.year:
        return "{} – {}".format(_date(date_from, "N jS"), _date(date_to, "N jS, Y"))
    return ""