From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout.scc.kit.edu [129.13.185.201]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pA1GZ8vc015620 for ; Tue, 1 Nov 2011 12:35:08 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-01.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RLHIp-0003J6-UP; Tue, 01 Nov 2011 17:35:07 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RLHIp-0004uk-TG for tech@mdocml.bsd.lv; Tue, 01 Nov 2011 17:35:07 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RLIF5-0000dn-LM for tech@mdocml.bsd.lv; Tue, 01 Nov 2011 18:35:19 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RLH8v-0005d7-0v for tech@mdocml.bsd.lv; Tue, 01 Nov 2011 17:24:53 +0100 Date: Tue, 1 Nov 2011 17:24:53 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: do not reformat man(7)-style dates Message-ID: <20111101162452.GP6817@iris.usta.de> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, while it's certainly a nice idea to reformat YYYY-MM-DD dates, which are common in man(7) manuals, to the Month Day, Year form used by mdoc(7), groff does not do this. I prefer groff-mandoc compatibility over man-mdoc uniformity in case the two conflict. So continue to accept YYYY-MM-DD, still do not warn about it, and leave the formatting untouched. OK? Ingo Index: mandoc.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/mandoc.c,v retrieving revision 1.29 diff -u -p -r1.29 mandoc.c --- mandoc.c 24 Oct 2011 20:29:21 -0000 1.29 +++ mandoc.c 1 Nov 2011 16:26:24 -0000 @@ -609,9 +609,10 @@ mandoc_normdate(struct mparse *parse, ch 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; } -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv