mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Put day of week on
This helps people understand how delivery dates fit into the week, because if sending a letter spans the weekend it will take a bit longer. We can remove `|string` now because `utc_string_to_aware_gmt_datetime` now accepts datetimes.
This commit is contained in:
@@ -334,6 +334,10 @@ def format_date_human(date):
|
||||
return get_human_day(date)
|
||||
|
||||
|
||||
def format_day_of_week(date):
|
||||
return utc_string_to_aware_gmt_datetime(date).strftime('%A')
|
||||
|
||||
|
||||
def _format_datetime_short(datetime):
|
||||
return datetime.strftime('%d %B').lstrip('0')
|
||||
|
||||
@@ -743,6 +747,7 @@ def add_template_filters(application):
|
||||
format_date_normal,
|
||||
format_date_short,
|
||||
format_datetime_relative,
|
||||
format_day_of_week,
|
||||
format_delta,
|
||||
format_notification_status,
|
||||
format_notification_type,
|
||||
|
||||
Reference in New Issue
Block a user