w3resource

Python HTMLCalendar Module: setfirstweekday() method

setfirstweekday() method

The setfirstweekday() method sets the weekday (0 is Monday, 6 is Sunday) to start each week.
The values MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, and SUNDAY are provided for convenience.

Syntax:

setfirstweekday()

Example of setfirstweekday() method

The following code set the first weekday to Sunday:

import calendar
calendar.setfirstweekday(calendar.SUNDAY)

Previous: formatyearpage()
Next: firstweekday()

Test your Python skills with w3resource's quiz



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/python/module/calendar/setfirstweekday.php