= strtotime(date('Y-m-d H:i:s', time()))) { return $counter - 1; } else { return daycount($day, strtotime("next $day", $startDate), ++$counter); } } $developers = ['Nikita', 'Pasha', 'Igor', 'Max']; $startDate = new \DateTime('2015-08-26 00:00'); $today = new \DateTime(); $diff = date_diff($today, $startDate); $daysDiff = $diff->format('%a'); $saturdays = daycount("saturday", $startDate->getTimestamp(), 0); $sundays = dayCount("sunday", $startDate->getTimestamp(), 0); $daysDiff -= ($saturdays + $sundays); $happyDeveloperIndex = $daysDiff % count($developers); $todayName = $today->format('D'); ?>

Support day: $developer): ?>