You are here

function views_handler_field_since in Views (for Drupal 7) 5

Format a date as "X time ago".

2 string references to 'views_handler_field_since'
statistics_views_default_views in modules/views_statistics.inc
user_views_default_views in modules/views_user.inc

File

./views.module, line 1648

Code

function views_handler_field_since($fieldinfo, $fielddata, $value, $data) {
  return $value ? t('%time ago', array(
    '%time' => format_interval(time() - $value, is_numeric($fielddata['options']) ? $fielddata['options'] : 2),
  )) : theme('views_nodate');
}