function _datex_popup_year_to_timestamp in Datex 7.3
Convert a gregorian date into timestamp.
2 calls to _datex_popup_year_to_timestamp()
- datex_popup_date_popup_process_alter in datex_popup/
datex_popup.module - Implements hook_date_popup_process_alter().
- _datex_date_popup_field_element_validate_callback in datex_popup/
datex_popup.module - Form element validation callback for date popup form element.
File
- datex_popup/
datex_popup.module, line 97
Code
function _datex_popup_year_to_timestamp(DatexInterface $cal, $greg_year, $want_greg) {
$cal
->xSetDate($greg_year, 1, 1);
if (!$want_greg) {
$cal
->setDateLocale($cal
->format('Y'), 1, 1);
}
return $cal
->getTimestamp();
}