var d = new Date(date);
var dd = d.getDate();
var MM = d.getMonth();
var mm = d.getMinutes();
var HH = d.getHours();
// Hour
var result = ("0" + HH).slice(-2);
// Minutes
var result = ("0" + mm).slice(-2);
// Month
var result = ("0" + MM).slice(-2);