You are here

function date_field_field_info in Date 8

Implements hook_field_info().

File

date_field/date_field.module, line 80

Code

function date_field_field_info() {
  return array(
    'date' => array(
      'label' => 'Date Range',
      'description' => t('Store a start and optional end date in the database as ISO dates.'),
      'settings' => array(
        'todate' => '',
        'granularity' => drupal_map_assoc(array(
          'year',
          'month',
          'day',
          'hour',
          'minute',
        )),
        'tz_handling' => 'site',
        'timezone_db' => 'UTC',
      ),
      'instance_settings' => array(
        'default_value' => 'now',
        'default_value_code' => '',
        'default_value2' => 'same',
        'default_value_code2' => '',
      ),
      'default_widget' => 'date_select',
      'default_formatter' => 'date_default',
      'default_token_formatter' => 'date_plain',
      'field item class' => '\\Drupal\\date\\Type\\DateItem',
    ),
  );
}