display all dates 200 days back

i need help! can someone help me please?
i try to calculate date under unix (ksh)...AIX operating system.

I have to find the date 200 days from today's date.
then the script should loop 200 times and display on command line every day's date until the current date.

example:

todays date: 2009-08-12
(calculate date 5 days from current date and loop and display until the date is current date)

Display:

2009-08-07
2009-08-08
2009-08-09
2009-08-10
2009-08-11

how can i do calculate?
i know that it is not possible with the date command!

Thanks in advance
Mark

I hope this is not a class assignment..

#!/bin/ksh

ago()
{
   perl -e ' my $delta = $ARGV[0] * -1;
             @t=localtime( time - ( 86400 * $delta )); 
             printf("%02d-%02d-%d", $t[3], $t[4]+1, $t[5]+1900); ' $1
}

wh=200
while [[ $wh -ge 0 ]] 
do
   echo $(ago $wh)             
   wh=$(( $wh - 1 ))
done

Thanks for your response. when I executed the script i got this;

28-02-2010
27-02-2010
26-02-2010
25-02-2010
24-02-2010
23-02-2010
22-02-2010
21-02-2010
20-02-2010
19-02-2010
18-02-2010
17-02-2010
16-02-2010
15-02-2010
14-02-2010
13-02-2010
12-02-2010
11-02-2010
10-02-2010
09-02-2010
08-02-2010
07-02-2010
06-02-2010
05-02-2010
04-02-2010
03-02-2010
02-02-2010
01-02-2010
31-01-2010
30-01-2010
29-01-2010
28-01-2010
27-01-2010
26-01-2010
25-01-2010
24-01-2010
23-01-2010
22-01-2010
21-01-2010
20-01-2010
19-01-2010
18-01-2010
17-01-2010
16-01-2010
15-01-2010
14-01-2010
13-01-2010
12-01-2010
11-01-2010
10-01-2010
09-01-2010
08-01-2010
07-01-2010
06-01-2010
05-01-2010
04-01-2010
03-01-2010
02-01-2010
01-01-2010
31-12-2009
30-12-2009
29-12-2009
28-12-2009
27-12-2009
26-12-2009
25-12-2009
24-12-2009
23-12-2009
22-12-2009
21-12-2009
20-12-2009
19-12-2009
18-12-2009
17-12-2009
16-12-2009
15-12-2009
04-09-2009
03-09-2009
02-09-2009
01-09-2009
31-08-2009
30-08-2009
29-08-2009
28-08-2009
27-08-2009
26-08-2009
25-08-2009
24-08-2009
23-08-2009
22-08-2009
21-08-2009
20-08-2009
19-08-2009
18-08-2009
17-08-2009
16-08-2009
15-08-2009
14-08-2009
13-08-2009
12-08-2009

The output I was interested in was to display all the dates last 200 days starting from current date in the format such as 2009-08-11.

Thanks
Mark

Change the printf statement

printf("%04d-%02d-02d", $t[5]+1900, $t[4+1, $t[4]);

Just replace the %D date format with whatever date format you want.

#!/bin/ksh93

typeset -i daysago=200

((++daysago)); while ((--daysago))
do
   printf "%(%D)T\n" "$daysago days ago"
done