def date(value, arg=None): """Formats a date according to the given format.""" from google.appengine._internal.django.utils.dateformat import format if not value: return '' if arg is None: arg = settings.DATE_FORMAT try: return formats.date_format(value, arg) except AttributeError: try: return format(value, arg) except AttributeError: return ''
def date(value, arg=None): """Formats a date according to the given format.""" from google.appengine._internal.django.utils.dateformat import format if not value: return u'' if arg is None: arg = settings.DATE_FORMAT try: return formats.date_format(value, arg) except AttributeError: try: return format(value, arg) except AttributeError: return ''
def date_format(value, format=None): """ Formats a datetime.date or datetime.datetime object using a localizable format """ return dateformat.format(value, get_format(format or 'DATE_FORMAT'))
def date_format(value, format=None): """ Formats a datetime.date or datetime.datetime object using a localizable format """ return dateformat.format(value, get_format(format or "DATE_FORMAT"))