event-editor/schedule-section: Simply switch-case statement

This commit is contained in:
Björn Daase
2022-02-12 17:37:11 +01:00
parent 69d320f49c
commit 02343e6b37
+2 -12
View File
@@ -233,12 +233,7 @@ format_datetime_for_display (GDateTime *date,
switch (days_diff)
{
case -7:
case -6:
case -5:
case -4:
case -3:
case -2:
case -7 ... -2:
/* Translators: %A is the weekday name (e.g. Sunday, Monday, etc) */
formatted_date = g_date_time_format (local_dt, _("Last %A"));
break;
@@ -255,12 +250,7 @@ format_datetime_for_display (GDateTime *date,
formatted_date = g_strdup (_("Tomorrow"));
break;
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 2 ... 7:
/* Translators: %A is the weekday name (e.g. Sunday, Monday, etc) */
formatted_date = g_date_time_format (local_dt, _("This %A"));
break;