You are here

public function Date::__construct in PersianTools 7

returns the week of the year

Parameters

integer $year --Optional timestamp:

integer $month --Optional:

integer $day --Optional:

integer $hour --Optional:

integer $minute --Optional:

integer $second --Optional:

single parameter is supposed to be a valid timestamp multiple --6-- parameters are supposed to be year, month, day, hour, minute, second values.

File

includes/Date.php, line 202

Class

Date

Namespace

Shamsi

Code

public function __construct() {
  if (func_num_args() == 1) {
    $this->_timestamp = func_get_arg(0);
  }
  else {
    if (func_num_args() == 6) {
      $this->_timestamp = $this
        ->mktime(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5));
    }
    else {
      $this->_timestamp = \time();
    }
  }
  $this
    ->_date();
}