From e10d38fea0956b01064f694bca3e827ba3f3e261 Mon Sep 17 00:00:00 2001 From: Deiz Date: Wed, 17 Oct 2012 12:29:02 -0400 Subject: [PATCH] Reduce the season day to 0-9 to properly print ordinal suffixes --- src/print_ddate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5