You are here

function _datex_factory_with_defaults in Datex 7.2

Factory of datex object with some default values.

2 calls to _datex_factory_with_defaults()
datex_form_alter in ./datex.module
Implements hook_form_alter().
_datex_node_edit_form_date_validate in ./datex.module
Element validation callback for date fields.

File

./datex.module, line 49
Convert output of date_format() to Jalali in a patched drupal installation.

Code

function _datex_factory_with_defaults($locale = NULL, $mode = NULL) {
  if (!($calendar = _datex_language_calendar($locale, $mode))) {
    return FALSE;
  }
  $tz = drupal_get_user_timezone();
  $intl = _datex_cfg('useintl');
  return datex_factory($calendar, NULL, $tz, '', $intl);
}