weekdayRange()
True on the given weekday or within the weekday range (SUN, MON, ... SAT). Local time unless "GMT" is passed.
weekdayRange(wd1 [, wd2] [, "GMT"]) → booleanTime-dependent PACs are hard to test and behave differently per engine; the checker evaluates them at a fixed “now” so results are reproducible.
Example
if (weekdayRange("MON", "FRI")) {
return "PROXY proxy.corp.example:8080";
}
Engine notes
| Engine | Behaviour | Source |
|---|---|---|
| chromium | Supports wrap-around ranges such as FRI to MON. | code, verified 2026-10-04 |
| firefox | Supports wrap-around ranges. | code, verified 2026-10-04 |
| pacparser | No wrap-around: a range like FRI to MON never matches. | code, verified 2026-10-04 |
Availability
| Function | chromium | chromium | firefox | pacparser | pacparser | pacparser | reference |
|---|---|---|---|---|---|---|---|
weekdayRange | yes | yes | yes | yes | yes | yes | yes |