Javascript has a Date object, so to get the date you simply do something along the lines of this: –

var d = new Date();
console.log(d.toString());