To return a given weekday name as a number
With this function, you can determine the corresponding weekday as a number from a weekday name. The weekday is a number with Monday = 0, Tuesday = 1, ... Sunday = 6.
The function can be quite handy if the weekday is only available as a text, for example, “Monday”, but you need it as a number for further processing.
weekdayIndex(myWeekdayName)To return the weekday of a given weekday name as a number with Monday = 0, Tuesday = 1, … Sunday = 6.