You are here

function cmfcCalendarV1::phpDate in Calendar Systems 5

Same name and namespace in other branches
  1. 8 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::phpDate()
  2. 8.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::phpDate()
  3. 6.3 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::phpDate()
  4. 6 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::phpDate()
  5. 7.3 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::phpDate()
  6. 7 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::phpDate()
  7. 7.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::phpDate()
7 calls to cmfcCalendarV1::phpDate()
cmfcCalendarV1Gregorian::timestampToInfoArray in calendar/v1/calendarSystems/gregorian.class.inc.php
cmfcCalendarV1Gregorian::timestampToStr in calendar/v1/calendarSystems/gregorian.class.inc.php
cmfcCalendarV1Iranian::date in calendar/v1/calendarSystems/iranian.class.inc.php
Implementation of PHP date function This is the simplified versino by Sina Salek
cmfcCalendarV1Iranian::infoArrayToTimestamp in calendar/v1/calendarSystems/iranian.class.inc.php
cmfcCalendarV1Iranian::monthStartDay in calendar/v1/calendarSystems/iranian.class.inc.php
Find num of Day Begining Of Month ( 0 for Sat & 6 for Sun)

... See full list

File

calendar/v1/calendarV1.class.inc.php, line 143

Class

cmfcCalendarV1

Code

function phpDate($format, $timestamp = null) {
  if (is_null($timestamp) or empty($timestamp)) {
    if (!empty($this->_timeZoneInfo)) {
      $timestamp = gmmktime() + $this->_timeZoneInfo['offset'];
      $r = gmdate($format, $timestamp);
    }
    else {
      $timestamp = mktime();
      $r = date($format, $timestamp);
    }
  }
  else {
    $r = date($format, $timestamp);
  }
  return $r;
}