
Date2Str(x, y) {
var z = { M: x.getMonth() + , d: x.getDate(), h: x.getHours(), m: x.getMinutes(), s: x.getSeconds() };
y = y.replace(/(M+|d+|h+|m+|s+)/g, function (v) { return ((v.length > ? "" : "") + eval('z.' + v.slice(-))).slice(-) });
return y.replace(/(y+)/g, function (v) { return x.getFullYear().toString().slice(-v.length) });
},
Date2Str(new Date(), "yyyy MM dd hh:mm:ss")
Date2Str(new Date(), "yyyy-MM-dd hh:mm:ss")