public function spouseFamily(Individual $individual): ?Family
    {
        // Exclude families that were created after this census date
        $families = [];
        foreach ($individual->spouseFamilies() as $family) {
            if (Date::compare($family->getMarriageDate(), $this->date()) <= 0) {
                $families[] = $family;
            }
        }

        if (empty($families)) {
            return null;
        }

        usort($families, static function (Family $x, Family $y): int {
            return Date::compare($x->getMarriageDate(), $y->getMarriageDate());
        });

        return end($families);
    }