Skip to content

Commit

Permalink
Date display is relative, older dates get less info
Browse files Browse the repository at this point in the history
  • Loading branch information
stefancrain committed Jan 24, 2013
1 parent dd606e5 commit bf5f151
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions civicrm/custom/php/CRM/IMAP/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion civicrm/custom/templates/CRM/IMAP/Page/Activities.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion civicrm/custom/templates/CRM/IMAP/Page/Mapper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit bf5f151

Please sign in to comment.