You are here

function commerce_reports_handler_field_date::render in Commerce Reporting 7.3

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

includes/views/commerce_reports_handler_field_date.inc, line 232
Views field handler for the created date on orders.

Class

commerce_reports_handler_field_date
@file Views field handler for the created date on orders.

Code

function render($values) {
  $timestamp = $this
    ->get_value($values);
  $format = $this
    ->getFormat();
  if (!empty($this->granularities[$format]['displayFormat'])) {
    $format = $this->granularities[$format]['displayFormat'];
  }
  $value = format_date($timestamp, 'custom', $format, 'UTC');
  return $this
    ->sanitize_value($value);
}