function _partial_date_render_component in Partial Date 7
File
- ./
partial_date.module, line 1528 - Defines a date element that allows for any combination of date granularity settings.
Code
function _partial_date_render_component($key, $item, $field, $format) {
switch ($field) {
case 'none':
return '';
case 'date_only':
return isset($item[$key]) ? $item[$key] : '';
case 'estimate_label':
case 'estimate_range':
// Start (single or from dates) or End (to dates) of estimate range
case 'estimate_component':
// Date component with fallback to estimate component
case 'date_or':
default:
return $field;
}
}