From 04cc425ad5987ba914232718ff8bbd5ef418b4d6 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 7 Mar 2011 01:35:51 +0000 Subject: 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, , which is included here. Feedback and OK on manual parts from jmc@. "please check this in" kristaps@ --- mandoc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mandoc.h') diff --git a/mandoc.h b/mandoc.h index 7cb37f35..b5984b26 100644 --- a/mandoc.h +++ b/mandoc.h @@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.57 2011/02/09 09:05:52 kristaps Exp $ */ +/* $Id: mandoc.h,v 1.58 2011/03/07 01:35:51 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * @@ -50,7 +50,8 @@ enum mandocerr { MANDOCERR_NOTITLE, /* no title in document */ MANDOCERR_UPPERCASE, /* document title should be all caps */ MANDOCERR_BADMSEC, /* unknown manual section */ - MANDOCERR_BADDATE, /* cannot parse date argument */ + MANDOCERR_NODATE, /* date missing, using today's date */ + MANDOCERR_BADDATE, /* cannot parse date, using it verbatim */ MANDOCERR_PROLOGOOO, /* prologue macros out of order */ MANDOCERR_PROLOGREP, /* duplicate prologue macro */ MANDOCERR_BADPROLOG, /* macro not allowed in prologue */ -- cgit v1.2.3