- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008-02-06 09:42 by mft, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (7) | ||
|---|---|---|
| msg62090 - (view) | Author: MATSUI Tetsushi (mft) | Date: 2008-02-06 09:41 |
TextCalendar.formatmonth is not influenced by setfirstweekday,
but the argument of constructor.
Documentation:
Depends on the first weekday as set by setfirstweekday().
actual behavior:
>>> cal0 = calendar.TextCalendar()
>>> print cal0.formatmonth(2008, 2)
February 2008
Mo Tu We Th Fr Sa Su
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29
>>> calendar.setfirstweekday(4)
>>> print cal0.formatmonth(2008, 2)
February 2008
Mo Tu We Th Fr Sa Su
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29
|
||
| msg62096 - (view) | Author: Walter Dörwald (doerwalter) * ![]() |
Date: 2008-02-06 14:47 |
setfirstweekday() isn't supposed to have any influence on calendar objects created explicitely. The function setfirstweekday() is only for the module level interface. The documentation is wrong here. However you *can* change the first weekday with the setfirstweekday() *method*. |
||
| msg62100 - (view) | Author: MATSUI Tetsushi (mft) | Date: 2008-02-06 15:24 |
Thank you for the clarification. But then, where is the documentation about the setfirstweekday() method? |
||
| msg62103 - (view) | Author: MATSUI Tetsushi (mft) | Date: 2008-02-06 16:25 |
There is another wrong documentation about firstweekday. In the part of Calendar.iterweekdays, a method "firstweekday" appered. But indeed it means the method "getfirstweekday()", since firstweekday is merely an uncallable integer attribute of Calendar objects. |
||
| msg62173 - (view) | Author: Walter Dörwald (doerwalter) * ![]() |
Date: 2008-02-07 19:36 |
The doccumentation is here:http://docs.python.org/dev/library/calendar.html#calendar.TextCalendar.formatmonth (or in Doc/library/calendar.rst in the source). Anyway the first of those documentation bugs is fixed now in r60649 (trunk) and r60650 (release25-maint). |
||
| msg62175 - (view) | Author: Walter Dörwald (doerwalter) * ![]() |
Date: 2008-02-07 19:56 |
You're supposed to use firstweekday as a property instead of using the getter method getfirstweekday(). Anyway this is fixed now in r60651 (trunk) and r60652 (release25-maint) |
||
| msg62191 - (view) | Author: MATSUI Tetsushi (mft) | Date: 2008-02-08 01:06 |
In the message msg62100, I asked about the place of *setfirstweekday()*. Your answer in the message msg62173 was about *formatmonth()*. I don't think the fix is complete until some explanations are given for firstweekday and/or its getter/setter, since they have been mentioned from your description fixes but have no entries. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:30 | admin | set | github: 46302 |
| 2008-02-08 01:06:58 | mft | set | messages: + msg62191 |
| 2008-02-07 19:56:17 | doerwalter | set | status: open -> closed resolution: accepted -> fixed messages: + msg62175 |
| 2008-02-07 19:36:23 | doerwalter | set | messages: + msg62173 |
| 2008-02-06 16:25:54 | mft | set | messages: + msg62103 |
| 2008-02-06 15:24:24 | mft | set | messages: + msg62100 |
| 2008-02-06 14:47:12 | doerwalter | set | assignee: doerwalter resolution: accepted messages: + msg62096 nosy: + doerwalter |
| 2008-02-06 12:08:39 | christian.heimes | set | priority: normal keywords: + easy type: behavior |
| 2008-02-06 09:42:00 | mft | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements

