Skip to content
Browse files
Added missing returns.
  • Loading branch information
felixfontein committed Sep 3, 2018
1 parent 3612b48 commit 6cecd6588f17d7c3975da0b39c35c94d698b6d74
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1206,7 +1206,7 @@ def formatted_date(self, date_format: 'str',
# zone designator for times in UTC and no microsecond precision.
return date.replace(microsecond=0).isoformat().replace('+00:00', 'Z')
elif LocaleBorg.datetime_formatter is not None:
LocaleBorg.datetime_formatter(date, date_format, lang, locale)
return LocaleBorg.datetime_formatter(date, date_format, lang, locale)
return babel.dates.format_datetime(date, date_format, locale=locale)

@@ -1230,7 +1230,7 @@ def date_formatter(match: '') -> str:
"""Format a date as requested."""
mode, custom_format = match.groups()
if LocaleBorg.in_string_formatter is not None:
LocaleBorg.in_string_formatter(date, mode, custom_format, lang, locale)
return LocaleBorg.in_string_formatter(date, mode, custom_format, lang, locale)
elif custom_format:
return babel.dates.format_date(date, custom_format, locale)

0 comments on commit 6cecd65

Please sign in to comment.