- return '<span class="relativedate" title="'.$gmtime.'">'.
- IkiWiki::formattime($time, $format).'</span>';
+ my $mid=' class="relativedate" title="'.$gmtime.'">'.
+ IkiWiki::formattime($time, $format);
+
+ if ($config{html5}) {
+ return '<time datetime="'.IkiWiki::date_3339($time).'"'.
+ ($pubdate ? ' pubdate="pubdate"' : '').$mid.'</time>';
+ }
+ else {
+ return '<span'.$mid.'</span>';
+ }