You are here

function calendar_systems_get_calendar_instance in Calendar Systems 5

Same name and namespace in other branches
  1. 8 calendar_systems.helpers.inc \calendar_systems_get_calendar_instance()
  2. 6.3 calendar_systems.module \calendar_systems_get_calendar_instance()
  3. 6 calendar_systems.module \calendar_systems_get_calendar_instance()
  4. 7.3 calendar_systems.module \calendar_systems_get_calendar_instance()
  5. 7 calendar_systems.helpers.inc \calendar_systems_get_calendar_instance()
  6. 7.2 calendar_systems.helpers.inc \calendar_systems_get_calendar_instance()
2 calls to calendar_systems_get_calendar_instance()
calendar_systems_format_date in ./calendar_systems.module
Format a date with the given configured format or a custom format string.
calendar_systems_form_alter in ./calendar_systems.module
Implementation of hook_form_alter(). Optionally record all form submissions, for later use in building distributions

File

./calendar_systems.module, line 30

Code

function calendar_systems_get_calendar_instance() {
  if (calendar_systems_get_active_lang() == 'fa') {
    $calendar = cmfcCalendar::factory('v1', array(
      'name' => 'iranian',
    ));
  }
  else {
    $calendar = cmfcCalendar::factory('v1', array(
      'name' => 'gregorian',
    ));
  }
  return $calendar;
}