diff options
author | Volker Schatz <oss@volkerschatz.com> | 2008-06-03 23:52:04 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2008-06-09 12:49:40 +0200 |
commit | 0eab17b95d813c93c8e7b5e7f5943f0940420f00 (patch) | |
tree | b152e72aa2b54feca2cf8d99fb07efaddccf209b /misc-utils | |
parent | 47bf8ef7f1d084befe2efcdd37a5f7c7c9d9da70 (diff) | |
download | util-linux-old-0eab17b95d813c93c8e7b5e7f5943f0940420f00.tar.gz |
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>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/ddate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/ddate.c b/misc-utils/ddate.c index 1f488aa6..df6b3718 100644 --- a/misc-utils/ddate.c +++ b/misc-utils/ddate.c @@ -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) { |