Here you are (suggest you ignore the unhelpful posts - webdev1958/bullant cannot resist making sneering comments, rather than offering any help):-
var mths = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var str = "2012-03-21"; // the date you specified YYYY-MM-DD
var sp = str.split("-");
var yr = sp;
var mthname = mths[mth];
var day = Number(sp);
day = day + ["th","st","nd","rd"][!(day%10>3||Math.floor(day%100/10)==1)*day%10];
var finaldate = day + " " + mthname + " " + yr;
Obviously one having captured the component parts of the date you can manipulate their order to display them in any format you wish. You could also easily add the name of the weekday if you wished.
"A good reputation can take years to aquire, a bad one takes a few seconds"