Skip to main content

weekday

Return the position of a weekday: 0 - 7, where 0 is Sunday.

def weekday(
name: str
) - > int

Return the position of a weekday: 0 - 7, where 0 is Sunday.

Parameters

NameTypeDescription
namestrThe full name or three-letter abbreviation of the weekday to look up.

Returns

TypeDescription
intThe integer index representing the day of the week, where 0 corresponds to Sunday and 1 to Monday.