summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-03-22 18:35:51 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-03-22 18:35:51 (GMT)
commit07c57d4e60083981a3ddcd8ca56b85dbc62c4dbb (patch)
treea047393fb1aa56d9c8ddf94389c1e31aeacfb522 /Lib
parente8c6a3eef66950a1dea7bf0c17961e170aab94f9 (diff)
downloadcpython-07c57d4e60083981a3ddcd8ca56b85dbc62c4dbb.zip
cpython-07c57d4e60083981a3ddcd8ca56b85dbc62c4dbb.tar.gz
cpython-07c57d4e60083981a3ddcd8ca56b85dbc62c4dbb.tar.bz2
better solution for bug #533234 courtesy of Tim.
Michael: use this version as the bugfix candidate...
Diffstat (limited to 'Lib')
-rw-r--r--Lib/calendar.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py
index 9ae768a..cb63547 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -33,7 +33,8 @@ class _localized_name:
if item < 0: item += self.len
if not 0 <= item < self.len:
raise IndexError, "out of range"
- return strftime(self.format, (item,)*8+(0,)).capitalize()
+ t = (2001, 1, item+1, 12, 0, 0, item, item+1, 0)
+ return strftime(self.format, t).capitalize()
elif isinstance(item, type(slice(0))):
return [self[e] for e in range(self.len)].__getslice__(item.start, item.stop)
def __len__(self):