How can I change the year range displayed by a FAPI date field? I have created a FAPI form with an element of #type => date and it works as expected. 

$form['date'] = array(
  '#type' =&gt; 'date',
  '#title' =&gt; t('Event date:'),
);


However, the options displayed in the year field range from 1900 - 2050. I would like to be able to limit this to a much smaller range starting with the current year. What would be the best way to accomplish this?
If you don't want to change every date field—which might have side effects else where on the site—you can easily do it on specific form elements.

function example_form(&amp;$form, &amp;$form_state)  {
  $form['birthday'] = array(
    '#type' =&gt; 'date',
    '#title' =&gt; t('Birthday'),
    '#required' =&gt; TRUE,
    // Add a second process function so we can change the years:
    '#process' =&gt; array('form_process_date', 'example_fix_year_range'),
  );

  return $form;
}

/**
 * Follow form_process_date() and re-do the years.
 */
function example_fix_year_range($element) {
  $year = format_date(REQUEST_TIME, 'custom', 'Y');
  $element['year']['#options'] = drupal_map_assoc(range($year - 120, $year));
  return $element;
}