This sort of thing is much more difficult than it should be with most tools. GNU
awk and Perl's POSIX module both give you a
strftime(), but not a
strptime(), which is what you want.
In any case, it is still pretty easy with Perl...
$ perl -MDate::Manip -lpe '$_=UnixDate(ParseDate($_), "%Y%m%d")' <<END
> July 29th, 2011
> December 9th, 2010
Obviously there's more to it, since you actually want to convert the HTML. If you can figure out a regex with sed that will work to find the date strings, you should be able to do something very similar with Perl.
$ perl -MDate::Manip -lpe 's/(")([^"]+)(")/$1 . UnixDate(ParseDate($2), "%Y%m%d") . $3/ge' <<END
dates enclosed "July 29th, 2011" in quotes
"December 9th, 2010"
dates enclosed "20110729" in quotes