diff --git a/src/Chronicler.php b/src/Chronicler.php index 500b3d2..b3d39a3 100644 --- a/src/Chronicler.php +++ b/src/Chronicler.php @@ -95,9 +95,9 @@ public function isRecorded(Record $record, string $period = null): bool $dateEnd = new DateTime('-'.Strings::trim($period, '+-')); $dateStart = new DateTime; - $qb->andWhere('e.date BETWEEN :dateStart AND :dateEnd') - ->setParameter('dateStart', $dateStart->setTime(0, 0, 0)) - ->setParameter('dateEnd', $dateEnd->setTime(23, 59, 59)); + $qb->andWhere('e.date < :dateStart AND e.date > :dateEnd') + ->setParameter('dateStart', $dateStart->setTime(23, 59, 59)) + ->setParameter('dateEnd', $dateEnd->setTime(0, 0, 0)); }); return $result instanceof Record;