src/LocalDateTime.php
public function withNano(int $nano) : LocalDateTime
    {
        $time = $this->time->withNano($nano);

        if ($time === $this->time) {
            return $this;
        }

        return new LocalDateTime($this->date, $time);
    }
public function withNano(int $nano) : LocalDateTime
    {
        $time = $this->time->withNano($nano);

        if ($time === $this->time) {
            return $this;
        }

        return new LocalDateTime($this->date, $time);
    }
public function withNano ( int $ nano ) : LocalDateTime { $ time = $ this -> time -> withNano ( $ nano ) ; if ( $ time === $ this -> time ) { return $ this ; } return new LocalDateTime ( $ this -> date , $ time ) ; }
Returns a copy of this LocalDateTime with the nano-of-second altered.

@param int $nano

@return LocalDateTime

@throws DateTimeException If the nano-of-second if not valid.
Returns a copy of this LocalDateTime with the nano - of - second altered .