diff options
author | dima <dima@FreeBSD.org> | 1995-09-22 00:50:37 +0000 |
---|---|---|
committer | dima <dima@FreeBSD.org> | 1995-09-22 00:50:37 +0000 |
commit | b5ee2c7636b3f67bd79a2668c559a9d9bd329036 (patch) | |
tree | ad3706723114aec8704e0f06daa7fd36e97e1da0 /usr.bin | |
parent | c1d2ad6c46a92ecde2bac4de4d8bb33501af8e8b (diff) | |
download | FreeBSD-src-b5ee2c7636b3f67bd79a2668c559a9d9bd329036.zip FreeBSD-src-b5ee2c7636b3f67bd79a2668c559a9d9bd329036.tar.gz |
Print "1day" instead of "1days"
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/w/pr_time.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c index ba94b50..1a50fdc 100644 --- a/usr.bin/w/pr_time.c +++ b/usr.bin/w/pr_time.c @@ -89,8 +89,10 @@ pr_idle(idle) time_t idle; { /* If idle more than 36 hours, print as a number of days. */ - if (idle >= 36 * 3600) - (void)printf(" %ddays ", idle / 86400); + if (idle >= 36 * 3600) { + int days = idle / 86400; + (void)printf(" %dday%s ", days, days > 1 ? "s" : "" ); + } /* If idle more than an hour, print as HH:MM. */ else if (idle >= 3600) |