Historique ménage pour une personne

This commit is contained in:
2021-06-15 17:03:38 +02:00
parent efdfd10e49
commit e95d8fbc7a
9 changed files with 420 additions and 5 deletions

View File

@@ -206,4 +206,13 @@ class HouseholdMember
{
return $this->holder;
}
public function isCurrent(\DateTimeImmutable $at = null): bool
{
$at = NULL === $at ? new \DateTimeImmutable('now'): $at;
return $this->getStartDate() < $at && (
NULL === $this->getEndDate() || $at < $this->getEndDate()
);
}
}