You are here

ed_classified_views_time_remaining_handler_field.inc in Classified Ads 6.2

Expiration date field handler for views

File

ed_classified_views_time_remaining_handler_field.inc
View source
<?php

/**
 * @file
 * Expiration date field handler for views
 */
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);
  }

}

Classes

Namesort descending Description
ed_classified_views_time_remaining_handler_field @file Expiration date field handler for views