diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-03-07 01:35:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-03-07 01:35:34 +0000 |
commit | e309b62a5156d70d03157abded5836eccaa56b7a (patch) | |
tree | 44a05144b8164f480fe009d9b9b7ed168d629e47 /share/man/man7/man.7 | |
parent | c59e5e6dbdacdeef70d0b723a5087e77503d2ee0 (diff) |
Clean up date handling,
as a first step to get rid of the frequent petty warnings in this area:
- always store dates as strings, not as seconds since the Epoch
- for input, try the three most common formats everywhere
- for unrecognized format, just pass the date though verbatim
- when there is no date at all, still use the current date
Originally triggered by a one-line patch from Tim van der Molen,
<tbvdm at xs4all dot nl>, which is included here.
Feedback and OK on manual parts from jmc@.
"please check this in" kristaps@
Diffstat (limited to 'share/man/man7/man.7')
-rw-r--r-- | share/man/man7/man.7 | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/share/man/man7/man.7 b/share/man/man7/man.7 index 5075e5992f2..5f5d878675f 100644 --- a/share/man/man7/man.7 +++ b/share/man/man7/man.7 @@ -1,4 +1,4 @@ -.\" $OpenBSD: man.7,v 1.16 2011/01/25 00:37:39 schwarze Exp $ +.\" $OpenBSD: man.7,v 1.17 2011/03/07 01:35:33 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 25 2011 $ +.Dd $Mdocdate: March 7 2011 $ .Dt MAN 7 .Os .Sh NAME @@ -118,15 +118,6 @@ rendered as an empty line. .Pp In macro lines, whitespace delimits arguments and is discarded. If arguments are quoted, whitespace within the quotes is retained. -.Ss Dates -The -.Sx \&TH -macro is the only -.Nm -macro that requires a date. -The form for this date is the ISO-8601 -standard -.Cm YYYY-MM-DD . .Ss Scaling Widths Many macros support scaled widths for their arguments, such as stipulating a two-inch paragraph indentation with the following: @@ -762,26 +753,27 @@ The paragraph left-margin width is reset to the default. Sets the title of the manual page with the following syntax: .Bd -filled -offset indent .Pf \. Sx \&TH -.Cm title section -.Op Cm date Op Cm source Op Cm volume +.Ar title section date +.Op Ar source Op Ar volume .Ed .Pp -At least the upper-case document -.Cm title -and the manual -.Cm section -arguments must be provided. -The -.Cm date -argument should be formatted as described in -.Sx Dates , -but will be printed verbatim if it is not. -If the date is not specified, the current date is used. -The -.Cm source +Conventionally, the document +.Ar title +is given in all caps. +The recommended +.Ar date +format is +.Sy YYYY-MM-DD +as specified in the ISO-8601 standard; +if the argument does not conform, it is printed verbatim. +If the +.Ar date +is empty or not specified, the current date is used. +The optional +.Ar source string specifies the organisation providing the utility. The -.Cm volume +.Ar volume string replaces the default rendered volume, which is dictated by the manual section. .Pp |