summaryrefslogtreecommitdiffstats
path: root/mdoc.7
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-11-02 06:22:44 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-11-02 06:22:44 +0000
commitd612b79e06155082b6342af68940fa671568998d (patch)
treec823b0d3420b6f66b76bf2249667aab2ed2ca0c2 /mdoc.7
parent768ae2f18e90273f3a363fe0374c8dc61ecff26b (diff)
downloadmandoc-d612b79e06155082b6342af68940fa671568998d.tar.gz
Added mandoc_a2time() for proper date conversion.
Fitted TH and Dd handlers to use mandoc_a2time(). Documented date syntax for -man, fixed documentation for -mdoc.
Diffstat (limited to 'mdoc.7')
-rw-r--r--mdoc.729
1 files changed, 9 insertions, 20 deletions
diff --git a/mdoc.7 b/mdoc.7
index 7e676092..eeed1f16 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -212,9 +212,8 @@ In free-form mode, quotes are regarded as opaque text.
.Ss Dates
There are several macros in
.Nm
-that require a date argument. The
-.Em canonical form
-for dates is the American format:
+that require a date argument. The canonical form for dates is the
+American format:
.Pp
.D1 Cm Month Day , Year
.Pp
@@ -226,26 +225,16 @@ value is the full month name. The
.Cm Year
value is the full four-digit year.
.Pp
-The
-.Em non-canonical form
-is the same as the canonical form, but without the comma between the
-.Cm Day
-and
-.Cm Year
-field.
+Reduced form dates are broken-down canonical form dates:
.Pp
-Lastly,
-.Em reduced form
-dates range from only a
-.Cm Year
-to the full canonical or non-canonical form.
+.D1 Cm Month , Year
+.D1 Cm Year
.Pp
Some examples of valid dates follow:
.Pp
.D1 "May, 2009" Pq reduced form
.D1 "2009" Pq reduced form
.D1 "May 20, 2009" Pq canonical form
-.D1 "May 20 2009" Pq non-canonical form
.
.Ss Scaling Widths
Many macros support scaled widths for their arguments, such as
@@ -710,10 +699,9 @@ this macro is not implemented in
.Ss \&%D
Publication date of an
.Sx \&Rs
-block. This should follow the reduced syntax for
+block. This should follow the reduced or canonical form syntax
+described in
.Sx Dates .
-Canonical or non-canonical form is not necessary since publications are
-often referenced only by year, or month and year.
.
.Ss \&%I
Publisher or issuer name of an
@@ -1152,9 +1140,10 @@ The
field may be either
.Ar $\&Mdocdate$ ,
which signifies the current manual revision date dictated by
-.Xr cvs 1
+.Xr cvs 1 ,
or instead a valid canonical date as specified by
.Sx Dates .
+If a date does not conform, the current date is used instead.
.Pp
Examples:
.Bd -literal -offset indent