Fix human readable time offset for future posts. Props ffemtcj. fixes #5817

git-svn-id: https://develop.svn.wordpress.org/trunk@6793 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-11 21:52:50 +00:00
parent 4239fc15ef
commit fedbb2dce5

View File

@ -47,10 +47,14 @@ foreach($posts_columns as $column_name=>$column_display_name) {
if ( '0000-00-00 00:00:00' ==$post->post_date ) {
_e('Unpublished');
} else {
if ( ( time() - get_post_time() ) < 86400 )
echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
else
if ( ( abs(time() - get_post_time()) ) < 86400 ) {
if ( ( 'future' == $post->post_status) )
echo sprintf( __('%s from now'), human_time_diff( get_post_time() ) );
else
echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
} else {
the_time(__('Y/m/d'));
}
}
?></a></td>
<?php