Reject invalid dates in date(1).
authorElliott Hughes <enh@google.com>
Sat, 8 Aug 2015 18:39:01 +0000 (13:39 -0500)
committerRob Landley <rob@landley.net>
Sat, 8 Aug 2015 18:39:01 +0000 (13:39 -0500)
commit400dacdeb69bc13868a625fc2ce8b49b6acd5ae3
tree4bb640b14bf3d65d67c20bb3e26587dc6325b42b
parent1203ddf0e1110a107cbabf4855e07055fabe1e42
Reject invalid dates in date(1).

Humans get upset when date(1) lets mktime(3) work out what the 99th day
of the 99th month would be rather than rejecting the invalid date. For
the subtly wrong cases, rather than get into the leap year business,
let's rely on localtime_r(3).
tests/date.test [new file with mode: 0644]
toys/posix/date.c