Add mandoc-manpage for date(1) and clean up code

and mark it as finished in README.
This commit is contained in:
FRIGN
2015-01-23 22:54:25 +01:00
parent b53469bc67
commit c208c6328a
3 changed files with 41 additions and 28 deletions

3
date.c
View File

@@ -34,12 +34,13 @@ main(int argc, char *argv[])
default:
usage();
} ARGEND;
if (argc > 0 && argv[0][0] == '+')
fmt = &argv[0][1];
if (!(now = tztime(&t)))
eprintf("%stime failed\n", tz);
strftime(buf, sizeof buf, fmt, now);
strftime(buf, sizeof(buf), fmt, now);
puts(buf);
return 0;