what is the difference between weekday and dayofweek function in spark SQL?

mrvi2310
New Contributor II

dayofweek: https://docs.databricks.com/sql/language-manual/functions/dayofweek.html

weekday : https://docs.databricks.com/sql/language-manual/functions/weekday.html

According to the documentation , they both are synonym functions.

But when I use it I noticed that weekday starts the day count from Tuesday = 1 weekday vs dayofweek

Would this be considered a bug or do both functions mean different things?