dateRange()
True if the current date is within the given day, month and/or year range.
dateRange(day | month | year ... [, "GMT"]) → booleanAccepts many argument forms (day, month, year, or ranges of them). Local time unless “GMT” is the last argument.
Example
if (dateRange("DEC", "JAN")) {
return "PROXY proxy-holiday.corp.example:8080";
}
Engine notes
| Engine | Behaviour | Source |
|---|---|---|
| chromium | Supports wrap-around ranges such as DEC to JAN. | code, verified 2026-10-04 |
| pacparser | No wrap-around ranges. | code, verified 2026-10-04 |
Availability
| Function | chromium | chromium | firefox | pacparser | pacparser | pacparser | reference |
|---|---|---|---|---|---|---|---|
dateRange | yes | yes | yes | yes | yes | yes | yes |