Ticket #1484843: year-date.patch
| File year-date.patch, 1.1 kB (added by mikelward, 9 months ago) |
|---|
-
main.inc
old new 1511 1511 1512 1512 $today_limit = mktime(0, 0, 0, $now_date['mon'], $now_date['mday'], $now_date['year']); 1513 1513 $week_limit = mktime(0, 0, 0, $now_date['mon'], $now_date['mday']-6, $now_date['year']); 1514 $year_limit = mktime(0, 0, 0, $now_date['mon']-11, 0, $now_date['year']); 1514 1515 1515 1516 // define date format depending on current time 1516 1517 if ($CONFIG['prettydate'] && !$format && $timestamp > $today_limit && $timestamp < $now) 1517 1518 return sprintf('%s %s', rcube_label('today'), date($CONFIG['date_today'] ? $CONFIG['date_today'] : 'H:i', $timestamp)); 1518 1519 else if ($CONFIG['prettydate'] && !$format && $timestamp > $week_limit && $timestamp < $now) 1519 1520 $format = $CONFIG['date_short'] ? $CONFIG['date_short'] : 'D H:i'; 1521 else if ($CONFIG['prettydate'] && !$format && $timestamp > $year_limit && $timestamp < $now) 1522 $format = $CONFIG['date_medium'] ? $CONFIG['date_medium'] : 'd.m H:i'; 1520 1523 else if (!$format) 1521 1524 $format = $CONFIG['date_long'] ? $CONFIG['date_long'] : 'd.m.Y H:i'; 1522 1525
