app/Module/ModuleHistoricEventsTrait.php
public function historicEventsForIndividual(Individual $individual): Collection
    {
        $min_date = $individual->getEstimatedBirthDate();
        $max_date = $individual->getEstimatedDeathDate();

        return (new Collection($this->historicEventsAll()))
            ->map(static function (string $gedcom) use ($individual): Fact {
                return new Fact($gedcom, $individual, 'histo');
            })
            ->filter(static function (Fact $fact) use ($min_date, $max_date): bool {
                return Date::compare($fact->date(), $min_date) >= 0 && Date::compare($fact->date(), $max_date) <= 0;
            });
    }
public function historicEventsForIndividual(Individual $individual): Collection
    {
        $min_date = $individual->getEstimatedBirthDate();
        $max_date = $individual->getEstimatedDeathDate();

        return (new Collection($this->historicEventsAll()))
            ->map(static function (string $gedcom) use ($individual): Fact {
                return new Fact($gedcom, $individual, 'histo');
            })
            ->filter(static function (Fact $fact) use ($min_date, $max_date): bool {
                return Date::compare($fact->date(), $min_date) >= 0 && Date::compare($fact->date(), $max_date) <= 0;
            });
    }
public function historicEventsForIndividual ( Individual $ individual ) : Collection { $ min_date = $ individual -> getEstimatedBirthDate ( ) ; $ max_date = $ individual -> getEstimatedDeathDate ( ) ; return ( new Collection ( $ this -> historicEventsAll ( ) ) ) -> map ( static function ( string $ gedcom ) use ( $ individual ) : Fact { return new Fact ( $ gedcom , $ individual , 'histo' ) ; } ) -> filter ( static function ( Fact $ fact ) use ( $ min_date , $ max_date ) : bool { return Date :: compare ( $ fact -> date ( ) , $ min_date ) >= 0 && Date :: compare ( $ fact -> date ( ) , $ max_date ) <= 0 ; } ) ; }
Which events should we show for an individual?

@param Individual $individual

@return Collection
Which events should we show for an individual?