createFromFormat() public static méthode

Create a DateTimeObject from the given $time and $format.
public static createFromFormat ( string | integer $time, null | string $format = null ) : DateTimeObject
$time string | integer Timestamp.
$format null | string Format in which the current timestamp is defined.
Résultat DateTimeObject
 public function testCreateFromFormat()
 {
     $dt = DateTimeObject::createFromFormat('15-Feb-2009', 'j-M-Y');
     $this->assertSame('15-Feb-2009', $dt->val());
 }