This is the solution using PHP date-time objects:
<?php $today = new datetime(); $thursday = $today->modify("last Thursday");
If necessary the date can be formatted:
$thursday->format('Y-m-d');