public static function FromFormat( string $format, $time, \DateTimeZone $timezone = null ) : DateTime
   {
      if ( $timezone !== null )
      {
         $dt = parent::createFromFormat( $format, $time, $timezone );
      }
      else
      {
         $dt = parent::createFromFormat( $format, $time );
      }

      if ( $dt instanceof \DateTime )
      {
         return static::FromDateTime( $dt );
      }

      throw new ArgumentError(
         'format',
         $format,
         'Date',
         \join( \PHP_EOL, parent::getLastErrors() )
      );

   }
public static function FromFormat( string $format, $time, \DateTimeZone $timezone = null ) : DateTime
   {
      if ( $timezone !== null )
      {
         $dt = parent::createFromFormat( $format, $time, $timezone );
      }
      else
      {
         $dt = parent::createFromFormat( $format, $time );
      }

      if ( $dt instanceof \DateTime )
      {
         return static::FromDateTime( $dt );
      }

      throw new ArgumentError(
         'format',
         $format,
         'Date',
         \join( \PHP_EOL, parent::getLastErrors() )
      );

   }
public static function FromFormat ( string $ format , $ time , \ DateTimeZone $ timezone = null ) : DateTime { if ( $ timezone !== null ) { $ dt = parent :: createFromFormat ( $ format , $ time , $ timezone ) ; } else { $ dt = parent :: createFromFormat ( $ format , $ time ) ; } if ( $ dt instanceof \ DateTime ) { return static :: FromDateTime ( $ dt ) ; } throw new ArgumentError ( 'format' , $ format , 'Date' , \ join ( \ PHP_EOL , parent :: getLastErrors ( ) ) ) ; }
Create a DateTime instance from a specific format.

@param string        $format
@param string        $time
@param \DateTimeZone $timezone
@throws \Beluga\ArgumentError
@return \Beluga\Date\DateTime
Create a DateTime instance from a specific format .