So I have a predefined interval, maybe 5, 10, 15, etc.
If someone enters 20, I need to round it based on the interval. So if it was a 15 minute interval, it would automatically move to 30, if it was a 45 minute interval, it would go to 45
Basically, anything <= interval becomes interval; all intervals between intervals become the next largest interval
I don't want to write some confusing php function to do this when there may be a simple way that I just don't know about.
source
share