User Tools

Site Tools


waituntilweekday

Table of Contents

WaitUntilWeekday

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.

Syntax

bool: WaitUntilWeekday(string weekDay='MON/TUE/WED/THU/FRI/SAT/SUN'[, bool ignoreToday=false])

Examples

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.
waituntilweekday.txt · Last modified: 2016/09/05 18:27 by act