diff --git a/src/PrayerTimes/PrayerTimes.php b/src/PrayerTimes/PrayerTimes.php index 9ff52f7..788c5dd 100644 --- a/src/PrayerTimes/PrayerTimes.php +++ b/src/PrayerTimes/PrayerTimes.php @@ -337,8 +337,8 @@ private function getFormattedTime($time, $format, $prayer) // Create temporary date object $date = clone $this->date; $date->setTime($hours, $twoDigitMinutes); - if ($prayer == 'Midnight') { - if ($hours >= 1 && $hours < 12) { + if (in_array($prayer, ['Midnight', 'Lastthird'])) { + if ($hours < 12) { // Hours are in military time, so if this falls on the next day, it will always be less than 12 $date->modify('+1 day'); } }