Name

setfirstweekday

Synopsis

setfirstweekday(weekday)

Sets the first day of each week to the weekday code weekday. Weekday codes are 0 (Monday) to 6 (Sunday). Module calendar also supplies attributes MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, and SUNDAY, whose values are the integers 0 to 6. Use these attributes when you mean weekday codes (e.g., calendar.FRIDAY instead of 4), to make your code clearer and more readable.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.