summaryrefslogtreecommitdiffstats
path: root/mdoc_action.c
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_action.c
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_action.c')
-rw-r--r--mdoc_action.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index d41f5073..3cd0332c 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -818,8 +818,7 @@ post_ar(POST_ARGS)
/*
- * Parse the date field in `Dd', primarily through mdoc_atotime().
- * FIXME: push mdoc_atotime() into here.
+ * Parse the date field in `Dd'.
*/
static int
post_dd(POST_ARGS)
@@ -829,7 +828,9 @@ post_dd(POST_ARGS)
if ( ! concat(m, buf, n->child, DATESIZ))
return(0);
- m->meta.date = mdoc_atotime(buf);
+ m->meta.date = mandoc_a2time
+ (MTIME_MDOCDATE | MTIME_CANONICAL, buf);
+
if (0 == m->meta.date) {
if ( ! mdoc_nwarn(m, n, EBADDATE))
return(0);