function _views_xhtml_is_date in Views Datasource 6
Same name and namespace in other branches
- 7 views_xhtml.module \_views_xhtml_is_date()
If input is a serialized date array, return a date string
Parameters
$input: Input to check.
Return value
Either the original input or a date string.
File
- ./
views_xhtml.module, line 299 - Module definition for views_xhtml
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 format_date(mktime(0, 0, 0, $date['month'], $date['day'], $date['year']), 'custom', DATE_ISO8601);
}
}