VBScript → Lua
The function returns the current day of the week (1-7) according to the script user's location.
Dim nDayOfWeek 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 an integer value.
The returned number evaluates to:
- 1 - Monday
- 2 - Tuesday
- 3 - Wednesday
- 4 - Thursday
- 5 - Friday
- 6 - Saturday
- 7 - Sunday
If you are interested in the name of the current day of the week (instead of the number) you can use the VBScript buildin function WeekdayName. In this case you need to know that the language the name is returned in is defined by the regional settings of the SwyxWare Service Account Windows user. Read more about this here.
This function can be called at any time within the call routing script.
Unlike the VBScript buildin function Weekday this function always starts with Monday as 1, regardless of any regional or location settings.