public static function Parse( $timeDefinition )
   {

      if ( $timeDefinition instanceof Time )
      {
         // No converting needed! Return as it.
         return $timeDefinition;
      }

      if ( $timeDefinition instanceof DateTime )
      {
         return $timeDefinition->getTime();
      }

      if ( $timeDefinition instanceof \DateTime )
      {
         return ( new DateTime( $timeDefinition ) )->getTime();
      }

      if ( false !== ( $dt = DateTime::Parse( $timeDefinition ) ) )
      {
         return $dt->getTime();
      }

      return false;

   }
public static function Parse( $timeDefinition )
   {

      if ( $timeDefinition instanceof Time )
      {
         // No converting needed! Return as it.
         return $timeDefinition;
      }

      if ( $timeDefinition instanceof DateTime )
      {
         return $timeDefinition->getTime();
      }

      if ( $timeDefinition instanceof \DateTime )
      {
         return ( new DateTime( $timeDefinition ) )->getTime();
      }

      if ( false !== ( $dt = DateTime::Parse( $timeDefinition ) ) )
      {
         return $dt->getTime();
      }

      return false;

   }
public static function Parse ( $ timeDefinition ) { if ( $ timeDefinition instanceof Time ) { // No converting needed! Return as it. return $ timeDefinition ; } if ( $ timeDefinition instanceof DateTime ) { return $ timeDefinition -> getTime ( ) ; } if ( $ timeDefinition instanceof \ DateTime ) { return ( new DateTime ( $ timeDefinition ) ) -> getTime ( ) ; } if ( false !== ( $ dt = DateTime :: Parse ( $ timeDefinition ) ) ) { return $ dt -> getTime ( ) ; } return false ; }
Parses a time definition to a \Beluga\Date\Time instance.

@param  mixed $timeDefinition The value to parse as Time. It can be a (date) time string, a unix timestamp, a
object of type \Beluga\DateTime or \DateTime or something that can be converted, by
a string cast, to a valid time string.
@return \Beluga\Date\Time|bool  Returns the created \Beluga\Date\Time instance, or boolean FALSE if parsing fails.
Parses a time definition to a \ Beluga \ Date \ Time instance .