Index: wp-includes/template-functions-general.php
===================================================================
--- wp-includes/template-functions-general.php	(revision 2444)
+++ wp-includes/template-functions-general.php	(working copy)
@@ -582,15 +582,16 @@
     //echo ""+$post->post_date;
 }
 
-function the_date($d='', $before='', $after='', $echo = true) {
+function the_date($d='', $before='', $after='', $echo = true, $date_type = '') {
     global $id, $post, $day, $previousday, $newday;
     $the_date = '';
     if ($day != $previousday) {
         $the_date .= $before;
+	$which_date = ( 'modified' == $date_type ) ? $post->post_modified : $post->post_date;
         if ($d=='') {
-	    $the_date .= mysql2date(get_settings('date_format'), $post->post_date);
+	    $the_date .= mysql2date(get_settings('date_format'), $which_date);
         } else {
-	    $the_date .= mysql2date($d, $post->post_date);
+	    $the_date .= mysql2date($d, $which_date);
         }
         $the_date .= $after;
         $previousday = $day;

