On this page
calendar.firstweekday
Prev: calendar.Day | Up: calendar | Next: calendar.HTMLCalendar
Rel: calendar.calendar, calendar.Calendar, calendar.Day, calendar.HTMLCalendar
Ref: docs.python.org — calendar.firstweekday
Tags: #public #python3 #stdlib #calendar
Import
import calendar
from calendar import firstweekday
Signature & Overview
calendar.firstweekday()
calendar.firstweekday() function.
Usage
import calendar
assert calendar.firstweekday() in range(7)
Gotchas
- Default is
0(calendar.MONDAY): Avoid mutating it globally withsetfirstweekday()in libraries—passfirstweekday=toCalendar(...)instead.
REPL Inspect
from calendar import firstweekday
help(firstweekday)
Linked from
- tuts/python3/stdlib_module/calendar
- tuts/python3/stdlib_module/calendar/calendar
- tuts/python3/stdlib_module/calendar/Calendar_class
- tuts/python3/stdlib_module/calendar/Day
- tuts/python3/stdlib_module/calendar/HTMLCalendar
- tuts/python3/stdlib_module/calendar/IllegalMonthError
- tuts/python3/stdlib_module/calendar/IllegalWeekdayError
- tuts/python3/stdlib_module/calendar/isleap
- tuts/python3/stdlib_module/calendar/leapdays
- tuts/python3/stdlib_module/calendar/LocaleHTMLCalendar
- tuts/python3/stdlib_module/calendar/LocaleTextCalendar
- tuts/python3/stdlib_module/calendar/month
- tuts/python3/stdlib_module/calendar/Month_class
- tuts/python3/stdlib_module/calendar/monthcalendar
- tuts/python3/stdlib_module/calendar/monthrange
- tuts/python3/stdlib_module/calendar/prcal
- tuts/python3/stdlib_module/calendar/prmonth
- tuts/python3/stdlib_module/calendar/setfirstweekday
- tuts/python3/stdlib_module/calendar/TextCalendar
- tuts/python3/stdlib_module/calendar/timegm
- tuts/python3/stdlib_module/calendar/weekday
- tuts/python3/stdlib_module/calendar/weekheader
Related notes
- tuts/python3/stdlib_module/calendar/calendar Linked here; links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/Calendar_class Linked here; links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/Day Linked here; links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/HTMLCalendar Linked here; links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/IllegalMonthError links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/IllegalWeekdayError links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/isleap links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/leapdays links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/LocaleHTMLCalendar links to this page; shared tags: #calendar, #stdlib
- tuts/python3/stdlib_module/calendar/LocaleTextCalendar links to this page; shared tags: #calendar, #stdlib