src/LocalDateTime.php
public static function fromDateTime(\DateTimeInterface $dateTime) : LocalDateTime
    {
        return new LocalDateTime(
            LocalDate::fromDateTime($dateTime),
            LocalTime::fromDateTime($dateTime)
        );
    }
public static function fromDateTime(\DateTimeInterface $dateTime) : LocalDateTime
    {
        return new LocalDateTime(
            LocalDate::fromDateTime($dateTime),
            LocalTime::fromDateTime($dateTime)
        );
    }
public static function fromDateTime ( \ DateTimeInterface $ dateTime ) : LocalDateTime { return new LocalDateTime ( LocalDate :: fromDateTime ( $ dateTime ) , LocalTime :: fromDateTime ( $ dateTime ) ) ; }
Creates a LocalDateTime from a native DateTime or DateTimeImmutable object.

@param \DateTimeInterface $dateTime

@return LocalDateTime
Creates a LocalDateTime from a native DateTime or DateTimeImmutable object .