Esempio n. 1
0
def date(value, format="EE, d MMMM y"):
    """
    @deprecated: use flask_babel's dateformat filter instead.
    """
    if isinstance(value, datetime.date):
        return babel.format_date(value, format)
    else:
        return babel.format_date(local_dt(value), format)
Esempio n. 2
0
def date_fmt(value, format="EE, d MMMM y"):
    """
    @deprecated: use flask_babel's dateformat filter instead.
    """
    if isinstance(value, date):
        return babel.format_date(value, format)
    else:
        return babel.format_date(local_dt(value), format)
Esempio n. 3
0
 def __init__(self, user, date):
     self.user = user
     self.date = local_dt(date)
Esempio n. 4
0
 def __init__(self, user, date):
     self.user = user
     self.date = local_dt(date)