eg:
function getDate(now_) {
var now = now_
* 1000;
now = new Date(now);
var years = now.
getFullYear();
var month=now.getMonth()+1;
var date=now.getDate();
if (month < 10) {
month = "0" + month.toString();
};
var new_date = years+"-"+month+"-"+date;
return new_date;
}