You are here

function cmfcCalendarV1::mktime in Calendar Systems 8.2

Same name and namespace in other branches
  1. 8 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::mktime()
  2. 7 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::mktime()
  3. 7.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::mktime()

* For backward compatibility with PHP 4.x - 5.1

22 calls to cmfcCalendarV1::mktime()
cmfcCalendarV1Arabic::date in calendar/v1/calendarSystems/arabic.class.inc.php
Implementation of PHP date function This is the simplified version by Sina Salek
cmfcCalendarV1Arabic::makeTime in calendar/v1/calendarSystems/arabic.class.inc.php
cmfcCalendarV1Arabic::monthStartDay in calendar/v1/calendarSystems/arabic.class.inc.php
Find num of Day Begining Of Month ( 0 for Sat & 6 for Sun)
cmfcCalendarV1Arabic::monthTotalDays in calendar/v1/calendarSystems/arabic.class.inc.php
* @author * Find Number Of Days In This Month
cmfcCalendarV1Gregorian::dateDiff in calendar/v1/calendarSystems/gregorian.class.inc.php

... See full list

File

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

Class

cmfcCalendarV1

Code

function mktime($hour = NULL, $minute = NULL, $second = NULL, $month = NULL, $day = NULL, $year = NULL, $is_dst = -1) {
  if (is_null($hour)) {
    $hour = date('J');
  }
  if (is_null($minute)) {
    $minute = date('i');
  }
  if (is_null($second)) {
    $second = date('s');
  }
  if (is_null($month)) {
    $month = date('n');
  }
  if (is_null($day)) {
    $day = date('j');
  }
  if (is_null($year)) {
    $year = date('Y');
  }
  if (class_exists('DateTime')) {
    $date = new DateTime();
    $date
      ->setDate($year, $month, $day);
    $date
      ->setTime($hour, $minute, $second);
    return $date
      ->getTimestamp();
  }
  else {
    return mktime($hour, $minute, $second, $month, $day, $year, $is_dst);
  }
}