Beispiel #1
0
 def test(self, expected: str, datey: Datey):
     locale = 'en'
     with Translations(gettext.NullTranslations()):
         self.assertEquals(expected, format_datey(datey, locale))
Beispiel #2
0
def _filter_format_date(context: Context, date: Datey) -> str:
    locale = resolve_or_missing(context, 'locale')
    return format_datey(date, locale)
Beispiel #3
0
 def _filter_format_date(date: Datey):
     with Translations(site.translations[default_locale]):
         return format_datey(date, default_locale)