]> git.sur5r.net Git - i3/i3status/commitdiff
Reduce the season day to 0-9 to properly print ordinal suffixes
authorDeiz <silverwraithii@gmail.com>
Wed, 17 Oct 2012 16:29:02 +0000 (12:29 -0400)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 19 Oct 2012 17:36:53 +0000 (19:36 +0200)
src/print_ddate.c

index 30bdc527a6d5122b8559b62aaf40782e36c239dc..6d39c51479aa0c237586677098fa5889f1ee0e1c 100644 (file)
@@ -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;