from datetime import datetime


def _jinja2_filter_datetime(date):
    """formats the datetime object to be more user readable"""
    native = date.replace(tzinfo=None)
    dateformat = '%b %d, %Y'
    # if the date is for today then just return "today".
    if native.strftime(dateformat) == str(datetime.now().strftime('%b %d, %Y')):
        return "Today"
    # else return the date formated: month, day, year
    return native.strftime(dateformat)