Brekeke SIP Server Wiki

$timeRange

Check whether the current time is in the range
With a time zone name, a summer time can be calculated automatically

 

Syntax:
$timerange( timeBegin, timeEnd )
$timerange( timeBegin, timeEnd, timezone )
Parameters:

timeBegin – the beginning of the time range.
timeEnd – the ending of the time range.
timezone – time zone

 

Returns:

true – if the current time is in the time range
false – otherwise

 

Version Since:

2.5

 

Where the function can be used:
  • Preliminary rules
  • Regular rules

 

Example:
$timerange("9:00", "17:00") = true

If the current time is between 9:00am and 5:00pm.

$timerange("9:00", "17:00", "PST") = false

If the current time is not between 9:00am and 5:00pm at the PST time zone.

 

See Also:

$time

Yes No
Suggest Edit