Script to find previous month last day minus one day timestamp

Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.

My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus oneday timestamp.

To summarise:
Required_timestamp=[(m -1)LastDay -1Day] where "m" is input month.
In my case it is 2000909.

Thanks in Advance.
Giri

date -d'-1 month -2 days' +'%Y%m'
200908

is that it?

Hi Friend,

No, i want the ouput with the midnight time for the previousmonths last day minus 1 day
This means if my input is 200909 then i should get the midnight time for 200908 last day minus one day. Script should ouput this "1251590400" ( midnight of 30th August 2009)
Thanks in advance,
Giri

noDay=$(date +%e)
lMonth=$(date -d"-$((noJour+1)) days" +%Y-%m-%d)
date -u -d"$lMonth" +%s
1251590400

?