diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-12-03 16:08:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-12-03 16:08:51 +0000 |
commit | bd84fbf4d9f29e27d3b34608e5bc635a50f2b889 (patch) | |
tree | d452b68a62e5c48af96460e0c719a3a08b84640c | |
parent | 883124f12caeda9265541a28686aca054e488ef9 (diff) | |
download | mandoc-bd84fbf4d9f29e27d3b34608e5bc635a50f2b889.tar.gz |
ISO style "%Y-%m-%d" dates are common in man(7) .TH.
They have been considered valid in the past, but were reformatted
to the mdoc(7) "Month day, year" style.
To make page footers more similar to groff, no longer reformat them,
just print them as they are.
This doesn't change anything with respect to what's considered valid
or what is warned about.
ok kristaps@
-rw-r--r-- | mandoc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -623,9 +623,10 @@ mandoc_normdate(struct mparse *parse, char *in, int ln, int pos) mandoc_msg(MANDOCERR_NODATE, parse, ln, pos, NULL); time(&t); } + else if (a2time(&t, "%Y-%m-%d", in)) + t = 0; else if (!a2time(&t, "$" "Mdocdate: %b %d %Y $", in) && - !a2time(&t, "%b %d, %Y", in) && - !a2time(&t, "%Y-%m-%d", in)) { + !a2time(&t, "%b %d, %Y", in)) { mandoc_msg(MANDOCERR_BADDATE, parse, ln, pos, NULL); t = 0; } |