Check if the value
is between 0 and the range
.
from( value, range )
This function is commonly used with the time() function to evaluate a time range.
value | Value to evaluate |
range | Range to compare to |
If the value
is negative or larger than range
the from() function returns 0.
Otherwise the function returns the difference between range
and value
.
from(35, 40) // returns 5 (=40-35) from(42, 40) // returns 0 from(-4, 40) // returns 0 from(time(17,00), 30) // Will return a positive number between 17:00 and 17:29 (inclusive). Otherwise returns 0.