Here’s a quick bit of code shamelessly ripped and tweaked from wp-includes/template-functions-general.php
‘s the_date
function. Put the following into my-hacks.php
and enable my-hacks support in Options->Miscellaneous.
<?php
function the_page_date($d='', $before='', $after='', $echo = true, $page_date_type='modified') {
global $id, $post, $day, $previousday, $newday;
$the_date = '';
if ($page_date_type=='modified') {
$db_date = $post->post_modified;
} else {
$db_date = $post->post_date;
}
if ($day != $previousday) {
$the_date .= $before;
if ($d=='') {
$the_date .= mysql2date(get_settings('date_format'), $db_date);
} else {
$the_date .= mysql2date($d, $db_date);
}
$the_date .= $after;
$previousday = $day;
}
$the_date = apply_filters('the_date', $the_date);
if ($echo) {
echo $the_date;
} else {
return $the_date;
}
}
?>
Then change the reference in your page.php
template from the_date(...)
to the_page_date(...)
This could be made a plugin as well, but this was quick.
EDIT: for a slightly more legible version of the above, see this pastebin.