2 parents e67bf1b + 0efc904 commit eea2a76Copy full SHA for eea2a76
1 file changed
eyed3/core.py
@@ -372,7 +372,14 @@ def _validateFormat(s):
372
pdate, fmt = None, None
373
for fmt in Date.TIME_STAMP_FORMATS:
374
try:
375
- pdate = time.strptime(s, fmt)
+ if "%d" in fmt and "%Y" not in fmt:
376
+ # Python 3.15+ no longer allows %d without %Y in strptime
377
+ # (see https://github.com/python/cpython/issues/70647).
378
+ # Prepend a dummy year to satisfy the requirement; the year
379
+ # value is never extracted because "%Y" is not in fmt.
380
+ pdate = time.strptime("2000" + s, "%Y" + fmt)
381
+ else:
382
+ pdate = time.strptime(s, fmt)
383
break
384
except ValueError:
385
# date string did not match format.
0 commit comments