Skip to content

weekday

Day of the week.

v = weekday(serial_number, return_type)

Returns the day-of-week as an integer. return_type selects the convention: 1 (default, Sunday=1, Saturday=7), 2 (Monday=1, Sunday=7), 3 (Monday=0, Sunday=6), 1117 (ISO-style with various week-start days).

weekday(date(2026, 4, 28)) % 3 (Tuesday in Sun-start)