Need a help in unix shell script in calculating date.

I will be getting date value (eg: 20150908) as parameter, now inside the script i need to calculate 7 days ago date (20150908 -7).

something like below:
date=20150908   

lastweek\_date=20150908 - 7 ---> this should output as 20150901

Could someone help me on this.

Thanks