=================================================================== RCS file: /cvs/pod2mdoc/pod2mdoc.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -p -r1.45 -r1.46 --- pod2mdoc/pod2mdoc.c 2015/02/14 13:11:10 1.45 +++ pod2mdoc/pod2mdoc.c 2015/02/14 15:34:39 1.46 @@ -1,4 +1,4 @@ -/* $Id: pod2mdoc.c,v 1.45 2015/02/14 13:11:10 schwarze Exp $ */ +/* $Id: pod2mdoc.c,v 1.46 2015/02/14 15:34:39 schwarze Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -1585,7 +1585,7 @@ dofile(const struct args *args, const char *fname, { char datebuf[64]; struct state st; - const char *fbase, *fext, *section, *date; + const char *fbase, *fext, *section, *date, *format; char *title, *cp; size_t sup, end, i, cur = 0; @@ -1630,8 +1630,12 @@ dofile(const struct args *args, const char *fname, /* Date. Or the given "tm" if not supplied. */ - if (NULL == (date = args->date)) { - strftime(datebuf, sizeof(datebuf), "%B %d, %Y", tm); + date = args->date; + format = (NULL == date) ? "%B %d, %Y" : + strcmp(date, "Mdocdate") ? NULL : "$Mdocdate: February 14 2015 $"; + + if (NULL != format) { + strftime(datebuf, sizeof(datebuf), format, tm); date = datebuf; }