bonjour.dates

Bonjour date helpers

bonjour.dates.TIGRINYA_MONTHS_ABBREVIATED

Abbreviated month names in Tigrinyna

bonjour.dates.TIGRINYA_MONTHS_WIDE

Full month names in Tigrinyna

bonjour.dates.format_date(date=None, format='medium', locale=None)[source]

Format date using the server’s locale as specified in settings.py. Uses the Julian calendar for Ethiopian dates (language codes “ti” and “am”) and the Gregorian calendar for other dates.

Parameters:
  • date (datetime.date) – Date to format
  • format (str) – “short”, “medium”, “long”, “full”
  • locale (str) – The locale to use (defaults to server locale as specified in settings.LANGUAGE_CODE
bonjour.dates.format_datetime(datetime=None, format='medium', locale=None)[source]

Alias to babel.dates.format_datetime() which defaults to the Django locale and time zone

bonjour.dates.format_time(time=None, format='medium', tzinfo=None, locale=None)[source]

Alias to babel.dates.format_time() which defaults to the Django locale and time zone

Previous topic

bonjour.app

Next topic

bonjour.ethiopian_date

This Page