﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
742	history raises error in datetime while using non english language	radek <translate@…>	Adrian Holovaty	"I slightly polished dateformat.py, which was the reason of rasing error in Admin/history, when using different locale settings.

Patch:
{{{
Index: C:/Python24/Lib/site-packages/django/utils/dateformat.py
===================================================================
--- C:/Python24/Lib/site-packages/django/utils/dateformat.py	(revision 1092)
+++ C:/Python24/Lib/site-packages/django/utils/dateformat.py	(working copy)
@@ -14,6 +14,7 @@
 from django.utils.dates import MONTHS, MONTHS_AP, WEEKDAYS
 from django.utils.tzinfo import LocalTimezone
 from calendar import isleap
+from calendar import monthrange
 import re, time
 
 re_formatchars = re.compile(r'(?<!\\)([aABdDfFgGhHiIjlLmMnNOPrsStTUwWyYzZ])')
@@ -124,10 +125,6 @@
 
     def I(self):
         ""'1' if Daylight Savings Time, '0' otherwise.""
-        raise NotImplementedError
-
-    def I(self):
-        ""'1' if Daylight Savings Time, '0' otherwise.""
         if self.timezone.dst(self.data):
             return '1'
         else:
@@ -185,7 +182,8 @@
 
     def t(self):
         ""Number of days in the given month; i.e. '28' to '31'""
-        raise NotImplementedError
+        num = monthrange(self.data.year, self.data.month)[1]
+        return '%02d' % num
 
     def T(self):
         ""Time zone of this machine; e.g. 'EST' or 'MDT'"" 
}}}
"	defect	closed	Core (Other)	1.0	major	fixed			Unreviewed	0	0	0	0	0	0
