summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-03-07 01:35:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-03-07 01:35:51 +0000
commit04cc425ad5987ba914232718ff8bbd5ef418b4d6 (patch)
treefffb227f8453437d1a80c4109593664bef06d4f4 /mdoc_html.c
parent130d794d1e169870967f8cbb047c5a35891cbfb7 (diff)
downloadmandoc-04cc425ad5987ba914232718ff8bbd5ef418b4d6.tar.gz
mandoc-04cc425ad5987ba914232718ff8bbd5ef418b4d6.tar.zst
mandoc-04cc425ad5987ba914232718ff8bbd5ef418b4d6.zip
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 'mdoc_html.c')
-rw-r--r--mdoc_html.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 712cd92a..89949737 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.153 2011/02/09 09:52:47 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.154 2011/03/07 01:35:51 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -500,9 +500,6 @@ mdoc_root_post(MDOC_ARGS)
{
struct htmlpair tag[3];
struct tag *t, *tt;
- char b[DATESIZ];
-
- time2a(m->date, b, DATESIZ);
PAIR_SUMMARY_INIT(&tag[0], "Document Footer");
PAIR_CLASS_INIT(&tag[1], "foot");
@@ -522,7 +519,7 @@ mdoc_root_post(MDOC_ARGS)
PAIR_CLASS_INIT(&tag[0], "foot-date");
print_otag(h, TAG_TD, 1, tag);
- print_text(h, b);
+ print_text(h, m->date);
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag[0], "foot-os");