I need to be able to round time to the next nearest 5 minutes.
Time now 11:54 - clock is 11:55 Time now 11:56 - clock is 12:00
Time now 11:54 - clock is 11:55
Time now 11:56 - clock is 12:00
var b = Date.now() + 15E4, c = b % 3E5; rounded = new Date(15E4>=c?b-c:b+3E5-c);