/*
* Convert Javascript Date Object to String XXXX-XX-XX
*/
function getStringDate(aDate){
var dd = aDate;
var yy = dd.getYear();
var mm = dd.getMonth() + 1;
dd = dd.getDate();
if (yy < 2000) { yy += 1900; }
if (mm < 10) { mm = "0" + mm; }
if (dd < 10) { dd = "0" + dd; }
var rs = yy + "-" + mm + "-" + dd;
return rs;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.