/*
* 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;
}
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme