Skip to content

Commit

Permalink
Added missing returns.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Sep 3, 2018
1 parent 3612b48 commit 6cecd65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/utils.py
Expand Up @@ -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)
else:
return babel.dates.format_datetime(date, date_format, locale=locale)

Expand All @@ -1230,7 +1230,7 @@ def date_formatter(match: 'typing.re.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)
else:
Expand Down

0 comments on commit 6cecd65

Please sign in to comment.