-.\" $OpenBSD: mdoc.7,v 1.158 2017/10/23 13:52:33 schwarze Exp $
+.\" $OpenBSD: mdoc.7,v 1.159 2018/07/28 18:32:30 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
-.\" Copyright (c) 2010, 2011, 2013-2017 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2010, 2011, 2013-2018 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 23 2017 $
+.Dd $Mdocdate: July 28 2018 $
.Dt MDOC 7
.Os
.Sh NAME
.Ar month
is the full English month name, the
.Ar day
-is an optionally zero-padded numeral, and the
+is an integer number, and the
.Ar year
is the full four-digit year.
.Pp
.Pp
Examples:
.Dl \&.Dd $\&Mdocdate$
-.Dl \&.Dd $\&Mdocdate: July 21 2007$
-.Dl \&.Dd July 21, 2007
+.Dl \&.Dd $\&Mdocdate: July 2 2018$
+.Dl \&.Dd July 2, 2018
.Pp
See also
.Sx \&Dt
-.\" $OpenBSD: mandoc.1,v 1.149 2018/05/03 14:21:20 schwarze Exp $
+.\" $OpenBSD: mandoc.1,v 1.150 2018/07/28 18:32:30 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 3 2018 $
+.Dd $Mdocdate: July 28 2018 $
.Dt MANDOC 1
.Os
.Sh NAME
date format
.Dq "Month dd, yyyy"
instead.
+.It Sy "normalizing date format to" : No ...
+.Pq mdoc , man
+The
+.Ic \&Dd
+or
+.Ic \&TH
+macro provides an abbreviated month name or a day number with a
+leading zero.
+In the formatted output, the month name is written out in full
+and the leading zero is omitted.
.It Sy "lower case character in document title"
.Pq mdoc , man
The title is still used as given in the
-/* $OpenBSD: mandoc.c,v 1.71 2017/07/03 13:40:00 schwarze Exp $ */
+/* $OpenBSD: mandoc.c,v 1.72 2018/07/28 18:32:30 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
if (t > time(NULL) + 86400)
mandoc_msg(MANDOCERR_DATE_FUTURE, man->parse,
ln, pos, cp);
+ else if (*in != '$' && strcmp(in, cp) != 0)
+ mandoc_msg(MANDOCERR_DATE_NORM, man->parse,
+ ln, pos, cp);
return cp;
}
-/* $OpenBSD: mandoc.h,v 1.189 2018/03/16 15:05:33 schwarze Exp $ */
+/* $OpenBSD: mandoc.h,v 1.190 2018/07/28 18:32:30 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
MANDOCERR_STYLE, /* ===== start of style suggestions ===== */
MANDOCERR_DATE_LEGACY, /* legacy man(7) date format: Dd ... */
+ MANDOCERR_DATE_NORM, /* normalizing date format to: ... */
MANDOCERR_TITLE_CASE, /* lower case character in document title */
MANDOCERR_RCS_REP, /* duplicate RCS id: ... */
MANDOCERR_SEC_TYPO, /* possible typo in section name: Sh ... */
-/* $OpenBSD: read.c,v 1.167 2018/03/16 15:05:33 schwarze Exp $ */
+/* $OpenBSD: read.c,v 1.168 2018/07/28 18:32:30 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2010, 2012 Joerg Sonnenberger <joerg@netbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
"generic style suggestion",
"legacy man(7) date format",
+ "normalizing date format to",
"lower case character in document title",
"duplicate RCS id",
"possible typo in section name",