makeFromDate() public static method

Make and return a new ExpressiveDate instance with defined year, month, and day.
public static makeFromDate ( integer $year = null, integer $month = null, integer $day = null, string | DateTimeZone $timezone = null ) : ExpressiveDate
$year integer
$month integer
$day integer
$timezone string | DateTimeZone
return ExpressiveDate
Beispiel #1
0
 public function testDateIsCreatedFromDate()
 {
     $date = ExpressiveDate::makeFromDate(2013, 1, 31);
     $this->assertEquals('2013-01-31', $date->getDate());
 }