From: Deiz Date: Wed, 17 Oct 2012 16:29:02 +0000 (-0400) Subject: Reduce the season day to 0-9 to properly print ordinal suffixes X-Git-Tag: 2.7~26 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e10d38fea0956b01064f694bca3e827ba3f3e261;p=i3%2Fi3status Reduce the season day to 0-9 to properly print ordinal suffixes --- diff --git a/src/print_ddate.c b/src/print_ddate.c index 30bdc52..6d39c51 100644 --- a/src/print_ddate.c +++ b/src/print_ddate.c @@ -95,7 +95,7 @@ static int format_output(char *outwalk, char *format, struct disc_time *dt) { break; case 'e': outwalk += sprintf(outwalk, "%d", dt->season_day + 1); - switch (dt->season_day) { + switch (dt->season_day % 10) { case 0: outwalk += sprintf(outwalk, "st"); break;