예제 #1
0
파일: Template.php 프로젝트: burbuja/pluf
/**
 * 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);
    }
}
예제 #2
0
파일: Paginator.php 프로젝트: burbuja/pluf
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'));
}