function today() { var d = new Date(); var s = ""; s += d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate(); return s; }