in reply to code to get the date for "next Thursday"
In the spirit of TMTOWTDI, here's a way to do it with GNU date:
date -d 'Thursday + 7 days' +"%Y-%m-%d" [download]
duff