You are here

ed_classified_views_time_remaining_handler_field.inc in Classified Ads 7.2

File

ed_classified_views_time_remaining_handler_field.inc
View source
<?php

class ed_classified_views_time_remaining_handler_field extends views_handler_field_date {
  function render($values) {
    $value = $values->edi_classified_nodes_expires_on;
    $time_now = REQUEST_TIME;
    $delta = $value ? $value - $time_now : 0;
    return format_interval($delta);
  }

}