public function Date::mktime in PersianTools 7
creates timestamp depending on the Persian time parameters
@access private
Parameters
mixed $year:
mixed $month:
mixed $day:
mixed $hour:
mixed $minute:
mixed $second:
Return value
integer time stamp
1 call to Date::mktime()
- Date::__construct in includes/
Date.php - returns the week of the year
File
- includes/
Date.php, line 601
Class
Namespace
ShamsiCode
public function mktime($year, $month, $day, $hour = 0, $minute = 0, $second = 0) {
$timeStamp = $second;
$timeStamp += $minute * 60;
$timeStamp += $hour * 60 * 60;
$dayOfYear = $day + $this->_mountCounter[$month - 1];
if ($year < 1300) {
$year += 1300;
}
$year -= 1348;
$day = $dayOfYear + round(self::KHAYAM_YEAR * $year, 0);
$day -= 287;
$timeStamp += $day * 86400;
$this->_timestamp = $timeStamp;
$this
->_zone();
$timeStamp = $timeStamp - $this->_timezoneOffset;
return $timeStamp;
}