- cp = mdoc_a2msec(n->string);
- if (cp) {
- m->meta.vol = xstrdup(cp);
- errno = 0;
- lval = strtol(n->string, &ep, 10);
- if (n->string[0] != '\0' && *ep == '\0')
- m->meta.msec = (int)lval;
- } else
- m->meta.vol = xstrdup(n->string);
-
- if (NULL == (n = n->next))
- return(post_prol(m));
-
- /* Handles: `.Dt TITLE SEC VOL'
- * --> title = TITLE, volume = VOL is vol ?
- * format(VOL) :
- * VOL is arch ? format(arch) :
- * VOL
+ n = n->next;
+ if (n && n->string && *n->string) {
+ m->meta.date = mandoc_a2time
+ (MTIME_ISO_8601, n->string);
+ if (0 == m->meta.date) {
+ if ( ! man_nmsg(m, n, MANDOCERR_BADDATE))
+ return(0);
+ m->meta.rawdate = mandoc_strdup(n->string);
+ }
+ } else
+ m->meta.date = time(NULL);
+
+ /* TITLE MSEC DATE ->SOURCE<- VOL */
+
+ if (n && (n = n->next))
+ m->meta.source = mandoc_strdup(n->string);
+
+ /* TITLE MSEC DATE SOURCE ->VOL<- */
+
+ if (n && (n = n->next))
+ m->meta.vol = mandoc_strdup(n->string);
+
+ /*
+ * Remove the `TH' node after we've processed it for our
+ * meta-data.