ddate: 11th, 12th and 13th of month

the Discordian date utility ddate gives the 11th, 12th and 13th of the month as
the "11st", "12nd" and "13rd".  Unless this is a religious thing, please apply
the patch below.

Signed-off-by: Volker Schatz <oss@volkerschatz.com>
This commit is contained in:
Volker Schatz 2008-06-03 23:52:04 +02:00 committed by Karel Zak
parent 47bf8ef7f1
commit 0eab17b95d
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ default_fmt
#define DY(y) (y+1166)
static inline char *ending(int i) {
return (i%10==1)?"st":(i%10==2?"nd":(i%10==3?"rd":"th"));
return i/10==1?"th":(i%10==1?"st":(i%10==2?"nd":(i%10==3?"rd":"th")));
}
static inline int leapp(int i) {