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)
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)
def __init__(self, user, date): self.user = user self.date = local_dt(date)