function partial_date_field_estimates_default_settings in Partial Date 7
Helper function to define the default estimate settings.
1 call to partial_date_field_estimates_default_settings()
- _partial_date_field_info in ./
partial_date.admin.inc - Internal callback for hook_field_info().
File
- ./
partial_date.admin.inc, line 37 - Less freq. functions for field administration.
Code
function partial_date_field_estimates_default_settings($clean = FALSE) {
$defaults = array(
'year' => array(
'-60000|1600' => t('Pre-colonial'),
'1500|1599' => t('16th century'),
'1600|1699' => t('17th century'),
'1700|1799' => t('18th century'),
'1800|1899' => t('19th century'),
'1900|1999' => t('20th century'),
'2000|2099' => t('21st century'),
),
'month' => array(
'11|1' => t('Winter'),
'2|4' => t('Spring'),
'5|7' => t('Summer'),
'8|10' => t('Autumn'),
),
'day' => array(
'0|12' => t('The start of the month'),
'10|20' => t('The middle of the month'),
'18|31' => t('The end of the month'),
),
'hour' => array(
'6|18' => t('Day time'),
'6|12' => t('Morning'),
'12|13' => t('Noon'),
'12|18' => t('Afternoon'),
'18|22' => t('Evening'),
'0|1' => t('Midnight'),
'18|6' => t('Night'),
),
# wtf, why not
'minute' => '',
'second' => '',
);
// The instance settings are blank so that they use the field settings
// by default.
if ($clean) {
foreach ($defaults as $key => $options) {
$defaults[$key] = '';
}
}
return $defaults;
}