diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-03-07 01:35:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-03-07 01:35:51 +0000 |
commit | 860c46e76e21acef233ea6b22f4cf3f19ac662a6 (patch) | |
tree | 3fd72d4d6d98f026b3dd3f02bd69673454089ab0 /man.7 | |
parent | 2d69adf810fd4bbdd2db0a89bd3f90a5d65821f4 (diff) | |
download | mandoc-860c46e76e21acef233ea6b22f4cf3f19ac662a6.tar.gz |
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 'man.7')
-rw-r--r-- | man.7 | 42 |
1 files changed, 17 insertions, 25 deletions
@@ -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: @@ -763,26 +754,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 |