How to subtract date with day..

eg;- curdate: 20130207 
Orginal date has to be : 20130206,2010205, 20130204,..., 20130201, 20130131, 20130130,etc..

How to do this with javascript (or the calculator step if you know Pentaho)?

Say, I want go all the days going back for 90 days.

Puzzled.