aboutsummaryrefslogtreecommitdiffstatshomepage
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
commita39b97ef0c1432973b5d815709925a82507c100b (patch)
tree9ca38e01caeb3a842bd0520375f0e52e83099515 /mdoc_action.c
parentf50364828978249af6c0a2c5e92ee923b8d86c75 (diff)
downloadmandoc-a39b97ef0c1432973b5d815709925a82507c100b.tar.gz
mandoc-a39b97ef0c1432973b5d815709925a82507c100b.tar.zst
mandoc-a39b97ef0c1432973b5d815709925a82507c100b.zip
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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index 56057e06..aed126d9 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_action.c,v 1.48 2009/10/31 06:10:58 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.49 2009/11/02 06:22:45 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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);