function _partial_date_component_type in Partial Date 7
Helper function to determine the component type for inserting the component separator.
Return value
mixed One of date, time or FALSE.
1 call to _partial_date_component_type()
- _partial_date_component_separator in ./
partial_date.module - Returns any configured separators for two components.
File
- ./
partial_date.module, line 1509 - Defines a date element that allows for any combination of date granularity settings.
Code
function _partial_date_component_type($key) {
switch ($key) {
case 'year':
case 'month':
case 'day':
return 'date';
case 'hour':
case 'minute':
case 'second':
return 'time';
case 'timezone':
default:
return FALSE;
}
}