You are here

function date_field_info in Date 6

Same name and namespace in other branches
  1. 8 date.field.inc \date_field_info()
  2. 5.2 date/date.module \date_field_info()
  3. 5 date.module \date_field_info()
  4. 6.2 date/date.module \date_field_info()
  5. 7.3 date.field.inc \date_field_info()
  6. 7 date.field.inc \date_field_info()
  7. 7.2 date.field.inc \date_field_info()

Implementation of hook_field_info().

File

date/date.module, line 34
Defines date/time field types for the Content Construction Kit (CCK).

Code

function date_field_info() {
  return array(
    'date' => array(
      'label' => 'Date',
      'description' => t('Store a date in the database as an ISO date, recommended for historical or partial dates.'),
      'callbacks' => array(
        'tables' => CONTENT_CALLBACK_DEFAULT,
        'arguments' => CONTENT_CALLBACK_DEFAULT,
      ),
    ),
    'datestamp' => array(
      'label' => 'Datestamp',
      'description' => t('Store a date in the database as a timestamp, deprecated format to suppport legacy data.'),
      'callbacks' => array(
        'tables' => CONTENT_CALLBACK_DEFAULT,
        'arguments' => CONTENT_CALLBACK_DEFAULT,
      ),
    ),
    'datetime' => array(
      'label' => 'Datetime',
      'description' => t('Store a date in the database as a datetime field, recommended for complete dates and times that may need timezone conversion.'),
      'callbacks' => array(
        'tables' => CONTENT_CALLBACK_DEFAULT,
        'arguments' => CONTENT_CALLBACK_DEFAULT,
      ),
    ),
  );
}