w3resource

Python TextCalendar Module: firstweekday() method

firstweekday() method

The firstweekday() method is used to get the current setting for the weekday to start each week.

Syntax:

firstweekday()

Example of firstweekday() method

import calendar
calendar.setfirstweekday(1)
print(calendar.firstweekday())

Output

1

Previous: setfirstweekday()
Next: isleap()

Test your Python skills with w3resource's quiz



Follow us on Facebook and Twitter for latest update.