First it would be easier to help you by sharing your code ;)
You can get last Thursday by using the method Date.getDay()which returning the current day of the week.
Like this :
var now = new Date();
var daysAfterLastThursday = (-7 + 4) - now.getDay(); // 7 = number of days in week, 4 = the thursdayIndex (0= sunday)
var currentMs = now.getTime();
var lastThursday = new Date(currentMs + (daysAfterLastThursday * 24 * 60 * 60 * 1000));
alert("Last Thursday : " + lastThursday);