Permalink
Browse files

Date display is relative, older dates get less info

  • Loading branch information...
1 parent dd606e5 commit bf5f151deb67616120741e8f1bd217c8652b6374 @stefancrain stefancrain committed Jan 24, 2013
@@ -377,9 +377,13 @@ public static function cleanDate($date_string, $type){
}else{
// check if the message is from last year
if ( (date("Y", strtotime($date_string_short)) - date("Y")) < 0 ){
- return date("M d, Y h:i A", strtotime($date_string_short));
+ return date("M d, Y", strtotime($date_string_short));
}else{
- return date("M d, h:i A", strtotime($date_string_short));
+ if ( (date("d", strtotime($date_string_short)) - date("d")) < 0 ){
+ return date("M d h:i A", strtotime($date_string_short));
+ }else{
+ return 'Today @ '.date("h:i A", strtotime($date_string_short));
+ }
}
}
@@ -8,7 +8,7 @@
<thead>
<tr class='list_header'>
<th class='checkbox' ><input class='checkbox_switch' type="checkbox" name="" value="" /></th>
- <th class='Name'>Sender’s Name</th>
+ <th class='Name'>Sender’s Info</th>
<th class='Subject'>Subject</th>
<th class='Date'>Date Sent</th>
<th class='Forwarded'>Forwarded By</th>
@@ -8,7 +8,7 @@
<thead>
<tr class='list_header'>
<th class='checkbox' ><input type="checkbox" name="" value="" class="checkbox_switch" /></th>
- <th class='Name'>Sender’s Name</th>
+ <th class='Name'>Sender’s Info</th>
<th class='Subject'>Subject</th>
<th class='Date'>Date Sent</th>
<th class='Forwarded'>Forwarded By</th>

0 comments on commit bf5f151

Please sign in to comment.