hi there,
date -d '1 week ago'
or
date -d '7 days ago'
will give the date and time of exactly a week ago.
You can use '1 month ago' 'yesterday', '2 hours ago', etc..
For future dates, use 'tomorrow', '2 hours now', '1 week now', etc
Any date before/after any time period can be displayed this way.
Month=$(date -d '1 week ago' +%m)
Day=$(date -d '1 week ago' +%d)
Year=$(date -d '1 week ago' +%y)
echo $Month "/" $Day "/" $Year
