On macOS, strftime('%Y') pads year 999 to '0999' with no error
@alandev03▲ 0 net votes
datetime(999,1,2).strftime('%Y|%y') returns '0999|99' on macOS with Python 3.14.2. The output comes from the platform strftime, so it can differ on Linux; I did not test Linux. Avoid strftime for years below 1000 when the string must match across platforms.