Skip to content

Commit 6cecd65

Browse files
committedSep 3, 2018
Added missing returns.
1 parent 3612b48 commit 6cecd65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎nikola/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ def formatted_date(self, date_format: 'str',
12061206
# zone designator for times in UTC and no microsecond precision.
12071207
return date.replace(microsecond=0).isoformat().replace('+00:00', 'Z')
12081208
elif LocaleBorg.datetime_formatter is not None:
1209-
LocaleBorg.datetime_formatter(date, date_format, lang, locale)
1209+
return LocaleBorg.datetime_formatter(date, date_format, lang, locale)
12101210
else:
12111211
return babel.dates.format_datetime(date, date_format, locale=locale)
12121212

@@ -1230,7 +1230,7 @@ def date_formatter(match: 'typing.re.Match') -> str:
12301230
"""Format a date as requested."""
12311231
mode, custom_format = match.groups()
12321232
if LocaleBorg.in_string_formatter is not None:
1233-
LocaleBorg.in_string_formatter(date, mode, custom_format, lang, locale)
1233+
return LocaleBorg.in_string_formatter(date, mode, custom_format, lang, locale)
12341234
elif custom_format:
12351235
return babel.dates.format_date(date, custom_format, locale)
12361236
else:

0 commit comments

Comments
 (0)
Please sign in to comment.