Oracle iPlanet Web Proxy Server 4.0.14 Administration Guide

dateRange() (day, month, year...)

The dateRange()() function detects a particular date or a range of dates, such as April 19th, 1996 through May 3rd, 1996. This function is useful if you want the FindProxyForURL() function to act differently depending on the day week, for example, if maintenance down time is regularly scheduled for one of the proxies.

The date range can be specified several ways:

dateRange(day)dateRange(day1, day2)dateRange(mon)dateRange(month1, month2)dateRange(year)dateRange(year1, year2)dateRange(day1, month1, day2, month2)dateRange(month1, year1, month2, year2)dateRange(day1, month1, year1, day2, month2, year2)dateRange(day1, month1, year1, day2, month2, year2, gmt)

Parameters

day is an integer between 1 and 31 for the day of month.

month is one of the month strings: JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC

year is a four-digit integer for the year number (for example, 1996).

gmt is either the string “GMT”, which indicates that time comparisons should occur in Greenwich Mean Time, or is left blank so that times are assumed to be in the local time zone. The GMT parameter can be specified in any of the call profiles, always as the last parameter. If only a single value is specified from each category (day, month, year), the function returns a true value only on days that match that specification. If two values are specified, the result is true from the first time specified through the second time specified.

Examples

This statement is true on the first day of each month, local time zone: dateRange(1)

This statement is true on the first day of each month, Greenwich Mean Time: dateRange(1, "GMT")

This statement is true for the first half of each month: dateRange(1, 15)

This statement is true on the 24th of December each year: dateRange(24, "DEC")

This statement is true on the 24th of December, 1995: dateRange(24, "DEC", 1995)

This statement is true during the first quarter of the year: dateRange("JAN", "MAR")

This statement is true from June 1st through August 15th, each year: dateRange(1, "JUN", 15, "AUG")

This statement is true from June 1st, 1995, until August 15th, 1995: dateRange(1, "JUN", 15, 1995, "AUG", 1995)

This statement is true from October 1995 through March 1996: dateRange("OCT", 1995, "MAR", 1996)

This statement is true during the entire year of 1995: dateRange(1995)

This statement is true from the beginning of 1995 until the end of 1997: dateRange(1995, 1997)