You are here

function views_xhtml_is_date in Views Datasource 5

1 call to views_xhtml_is_date()
views_xhtml_hCalendar_render in ./views_xhtml.module

File

./views_xhtml.module, line 575
Provides Views plugin for rendering node content as XHTML microformats.

Code

function views_xhtml_is_date($input) {
  if (strpos($input, 'a:3:{s:5:"month"') !== 0) {
    return $input;
  }
  else {

    //serialized date array
    $date = unserialize($input);
    return date(DATE_ISO8601, mktime(0, 0, 0, $date['month'], $date['day'], $date['year']));
  }
}