Slightly clearer (#26060)

Without to_locale, it's not a locale anymore, so don't call it that.
This commit is contained in:
Ned Batchelder
2021-01-13 13:34:30 -05:00
committed by GitHub
parent e4b8f56e26
commit 91d0c43cc8

View File

@@ -193,7 +193,6 @@ class DateSummary(object):
Note: this returns a span that will be localized on the client.
"""
locale = get_language()
user_timezone = user_timezone_locale_prefs(crum.get_current_request())['user_timezone']
return HTML(
u'<span class="date localized-datetime" data-format="{date_format}" data-datetime="{date_time}"'
@@ -203,7 +202,7 @@ class DateSummary(object):
date_format=date_format,
date_time=self.date,
user_timezone=user_timezone,
user_language=locale,
user_language=get_language(),
)
@property