find a date two weeks ago?

Anyone got a script or suggestion for this?

I want to find the date when a parameter in days is supplied..

ie.. parameter can be any number for example 15... and the date returned should then be 15 days ago... or 31 and the date returned should be 31 days ago...

Any ideas on best way to get this?
I am running solaris 9 and can install any commands if necessary.
I know GNU date utility can help me - but I cannot locate where to download this for solaris sparc....

as always.. have you tried searchiing the FAQs first?

ruby -rdate -e '(Date.today - ARGV.first.to_i).display' 31
2006-03-22