- if (NULL == in || '\0' == *in ||
- 0 == strcmp(in, "$" "Mdocdate$")) {
- mandoc_msg(MANDOCERR_NODATE, parse, ln, pos, NULL);
- time(&t);
- }
- else if (a2time(&t, "%Y-%m-%d", in))
- t = 0;
- else if (!a2time(&t, "$" "Mdocdate: %b %d %Y $", in) &&
- !a2time(&t, "%b %d, %Y", in)) {
- mandoc_msg(MANDOCERR_BADDATE, parse, ln, pos, NULL);
- t = 0;
+ /* No date specified: use today's date. */
+
+ if (in == NULL || *in == '\0' || strcmp(in, "$" "Mdocdate$") == 0) {
+ mandoc_msg(MANDOCERR_DATE_MISSING, parse, ln, pos, NULL);
+ return time2a(time(NULL));