Lua → VBScript SwxWare v13.10
The function returns the current day of the week (1-7) according to the script user's location.
local nDayOfWeek = CurDayOfWeek()
or if being used directly within a GSE property dialog, e.g. in a Say Number block to directly announce the current day of the week (as a number) to the caller:
This function returns a number value.
The returned number evaluates to:
- 1 - Sunday
- 2 - Monday
- 3 - Tuesday
- 4 - Wednesday
- 5 - Thursday
- 6 - Friday
- 7 - Saturday
If you are interested in the name of the current day of the week (instead of the number) you can use the Lua build-in function os.time().
This function can be called at any time within the call routing script.