You are here

function date_popup_date_granularity in Date 7

Same name and namespace in other branches
  1. 7.3 date_popup/date_popup.module \date_popup_date_granularity()
  2. 7.2 date_popup/date_popup.module \date_popup_date_granularity()
3 calls to date_popup_date_granularity()
date_popup_date_format in date_popup/date_popup.module
date_popup_process_date in date_popup/date_popup.module
Process the date portion of the element.
date_popup_validate in date_popup/date_popup.module
Massage the input values back into a single date.

File

date_popup/date_popup.module, line 171
A module to enable jquery calendar and time entry popups. Requires the Date API.

Code

function date_popup_date_granularity($element) {
  $granularity = date_format_order($element['#date_format']);
  return array_intersect($granularity, array(
    'month',
    'day',
    'year',
  ));
}