mirror of
https://github.com/python/cpython
synced 2024-09-16 04:09:56 +00:00
GH-108202: Document `calendar
` exceptions (#108398)
This commit is contained in:
parent
ddf66b54ed
commit
135098743a
|
@ -469,6 +469,29 @@ The :mod:`calendar` module exports the following data attributes:
|
|||
|
||||
Aliases for day numbers, where ``MONDAY`` is ``0`` and ``SUNDAY`` is ``6``.
|
||||
|
||||
|
||||
The :mod:`calendar` module defines the following exceptions:
|
||||
|
||||
.. exception:: IllegalMonthError(month)
|
||||
|
||||
A subclass of :exc:`ValueError`,
|
||||
raised when the given month number is outside of the range 1-12 (inclusive).
|
||||
|
||||
.. attribute:: month
|
||||
|
||||
The invalid month number.
|
||||
|
||||
|
||||
.. exception:: IllegalWeekdayError(weekday)
|
||||
|
||||
A subclass of :exc:`ValueError`,
|
||||
raised when the given weekday number is outside of the range 0-6 (inclusive).
|
||||
|
||||
.. attribute:: weekday
|
||||
|
||||
The invalid weekday number.
|
||||
|
||||
|
||||
.. seealso::
|
||||
|
||||
Module :mod:`datetime`
|
||||
|
|
Loading…
Reference in a new issue