Morilog\Jalali\jDate::forge PHP Method

forge() public static method

public static forge ( string | null $str = null, null $timezone = null )
$str string | null
$timezone null
    public static function forge($str = null, $timezone = null)
    {
        return new static($str, $timezone);
    }

Usage Example

Esempio n. 1
0
 public function test_time()
 {
     $time = time();
     $theTime = \Morilog\Jalali\jDate::forge($time)->time();
     $this->assertTrue($time === $theTime);
     $theTime = \Morilog\Jalali\jDate::forge('now')->time();
     $this->assertTrue($theTime === strtotime('now'));
 }
All Usage Examples Of Morilog\Jalali\jDate::forge