src/LocalDate.php
public static function fromDateTime(\DateTimeInterface $dateTime) : LocalDate
    {
        return new LocalDate(
            (int) $dateTime->format('Y'),
            (int) $dateTime->format('n'),
            (int) $dateTime->format('j')
        );
    }
public static function fromDateTime(\DateTimeInterface $dateTime) : LocalDate
    {
        return new LocalDate(
            (int) $dateTime->format('Y'),
            (int) $dateTime->format('n'),
            (int) $dateTime->format('j')
        );
    }
public static function fromDateTime ( \ DateTimeInterface $ dateTime ) : LocalDate { return new LocalDate ( ( int ) $ dateTime -> format ( 'Y' ) , ( int ) $ dateTime -> format ( 'n' ) , ( int ) $ dateTime -> format ( 'j' ) ) ; }
Creates a LocalDate from a native DateTime or DateTimeImmutable object.

@param \DateTimeInterface $dateTime

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