Просто посчитай дни.
<?php
$today = strtotime(date("d-m-Y 00:00:00", time()));
$days = ["Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"];
$timeForHumans = function (int $time) use ($today, $days): string {
$diff = $today - $time;
$day = 86400;
if ($diff < 0 && $diff >= -$day) {
return "Сегодня";
}
elseif ($diff > 0 && $diff <= $day) {
return "Вчера";
}
elseif ($diff > $day && $diff < $day * 6) {
return $days[date("w", $time)];
}
return date("d.m.Y", $time);
};
for ($i = 0; $i < 10; $i++) {
echo $timeForHumans(time() - (86400 * $i)) . PHP_EOL;
}