Issue #11930: Remove year >= 1000 limitation from datetime.strftime.

Patch by Victor Stinner.
This commit is contained in:
Alexander Belopolsky 2011-05-02 13:14:24 -04:00
parent 9d8c3b7cef
commit 89da349b7b
4 changed files with 6 additions and 41 deletions

View file

@ -172,10 +172,6 @@ def _format_time(hh, mm, ss, us):
# Correctly substitute for %z and %Z escapes in strftime formats.
def _wrap_strftime(object, format, timetuple):
year = timetuple[0]
if year < 1000:
raise ValueError("year=%d is before 1000; the datetime strftime() "
"methods require year >= 1000" % year)
# Don't call utcoffset() or tzname() unless actually needed.
freplace = None # the string to use for %f
zreplace = None # the string to use for %z