You are here

function date_sql_handler::granularity_form in Date 7

Same name and namespace in other branches
  1. 5.2 date_api_sql.inc \date_sql_handler::granularity_form()
  2. 6.2 date_api_sql.inc \date_sql_handler::granularity_form()
  3. 7.3 date_api/date_api_sql.inc \date_sql_handler::granularity_form()
  4. 7.2 date_api/date_api_sql.inc \date_sql_handler::granularity_form()

File

date_api/date_api_sql.inc, line 693
SQL helper for Date API.

Class

date_sql_handler
A class to manipulate date SQL.

Code

function granularity_form($granularity) {
  $form = array(
    '#title' => t('Granularity'),
    '#type' => 'radios',
    '#default_value' => $granularity,
    '#options' => $this
      ->date_parts(),
  );
  return $form;
}