/** * Display the time in a "6 days, 23 hours ago" style. */ function Pluf_Template_timeAgo($date, $f = "withal") { Pluf::loadFunction('Pluf_Date_Easy'); $date = Pluf_Template_timeFormat($date); if ($f == 'withal') { return Pluf_Date_Easy($date, null, 2, __('now')); } else { return Pluf_Date_Easy($date, null, 2, __('now'), false); } }
function Pluf_Paginator_DateAgo($field, $item) { Pluf::loadFunction('Pluf_Date_Easy'); Pluf::loadFunction('Pluf_Template_dateFormat'); $date = Pluf_Template_dateFormat($item->{$field}, '%Y-%m-%d %H:%M:%S'); return Pluf_Date_Easy($date, null, 2, __('now')); }