Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12231

How to round time to the nearest quarter hour in JavaScript?

$
0
0

For example:

Given time: 08:22 => Rounded to: 08:15Given time: 08:23 => Rounded to: 08:30

Should be pretty simple. But all I was able to produce is lengthy, not very good code to solve the issue. My mind's just gone blank.

Regards


Viewing all articles
Browse latest Browse all 12231

Trending Articles