Roku
07-09-2008, 08:39 PM
How do I add minutes or hours to a Date object? For example, my application is kind of like an alarm clock with a "snooze" feature, and for the snooze time I need to add 15 minutes to the original time.
var now = new Date();
var minutes = now.getMinutes();
var snooze = minutes + 15;
A start?? Snooze returns only the minutes, of course. I need it to return the full date and time.
I've been searching for two days, how come I can't find anything referring to this at all?! X_x
var now = new Date();
var minutes = now.getMinutes();
var snooze = minutes + 15;
A start?? Snooze returns only the minutes, of course. I need it to return the full date and time.
I've been searching for two days, how come I can't find anything referring to this at all?! X_x