mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Issue #11930: Remove year >= 1000 limitation from datetime.strftime.
Patch by Victor Stinner.
This commit is contained in:
parent
9d8c3b7cef
commit
89da349b7b
4 changed files with 6 additions and 41 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue