1
I have a code that adds an hour or more in the hour field, I would now like to add in minutes as well. That is, if the movement of minutes is equal to 30, add another 30 min.
var decalage = +1
var decalage_minute = 30
var d = new Date(); //date
//convert date timestamp
function heure_decalage_f(date, decalage){
var data = new Date(date.getTime() + (decalage * 60 * 60 * 1e3));
return data.getHours();
}
var heure_decalage = heure_decalage_f(d,decalage);
var minute = d.getMinutes();
var seconds = d.getSeconds();
alert(heure_decalage + ":" + minute);
Thanks for the reply, but for example if you add 50min you should also add another hour.
– akm
Go to @akm now...
– Jorge B.