in reply to Converting to decimal elsif
$start_minute = int(($start_minute + 7.5)/15)/4;
Let's break this down:
$start_minute + 7.5 # add 7.5 mins to number /15 # which quarter is the minute in? int() # ...0,1,2,3 or 4? /4 # to get desired result
cLive ;-)
Update: oops, tye beat me to it (in a slightly different, but effectively the same, way)... :)
|
|---|