3 ms·
Yes, I've deliberately used it that way in the past: newDate = new Date(refDate.getFullYear(), refDate.getMonth(), refDate.getDate(), refDate.getHours()+10
by dspillett 11y ago
Yes, I've deliberately used it that way in the past:
newDate = new Date(refDate.getFullYear(), refDate.getMonth(), refDate.getDate(), refDate.getHours()+1000, refDate.getMinutes())
letting it deal with the wrapping of larger date/time parts as needed.