The WaitUntilWeekday
function waits (blocks) until the given weekday is reached. The function returns false
if no arguments are passed. If the weekDay argument cannot be interpreted then it is assumed to be MON
.
bool: WaitUntilWeekday(string weekDay='MON/TUE/WED/THU/FRI/SAT/SUN'[, bool ignoreToday=false])
var result = WaitUntilWeekday(); // result: false var result = WaitUntilWeekday('MON', false); // waits until Monday 00:00. If today is Monday then // the function immediately returns. var result = WaitUntilWeekday('MON', true); // waits until Monday 00:00. If today is Monday then // the function waits for one week until next Monday 00:00.