Sun Java System Web Proxy Server 4.0.11 Administration Guide

timeRange (hour, minute, second...)

The timeRange() function detects a particular time of day or a range of time, such as 9 p.m. through 12 a.m. This function is useful if you want the FindProxyForURL() function to act differently depending on what time it is.

timeRange(hour)timeRange(hour1, hour2)timeRange(hour1, min1, hour2, min2)timeRange(hour1, min1, sec1, hour2, min2, sec2)

Parameters:

hour is the hour from 0 to 23. 0 is midnight, 23 is 11:00 p.m.

min is the number of minutes from 0 to 59.

sec is the number of seconds from 0 to 59.

gmt is either the string GMT for GMT time zone, or not specified for the local time zone. This parameter can be used with each of the parameter profiles and is always the last parameter.

Returns Values

true or false

Examples:

This statement is true from noon to 1:00 p.m: timerange(12, 13)

This statement is true noon to 12:59 p.m. GMT: timerange(12, "GMT")

This statement is true from 9:00 a.m. to 5:00 p.m: timerange(9, 17)

This statement is true between midnight and 30 seconds past midnight: timerange(0, 0, 0, 0, 0, 30)