String comparison works as long as you order your date time by significance and zero pad all values, which they were doing with their date stamp anyway.
Plus if they weren’t then even numerical comparisons would fail eg 1012021 (Oct/1/2021) < 5102020 (May/10/2020) so you argument is moot.
This is going to be a problem in about 8,000 years tho.
Wouldn't it be done more like this though?
"%04d%02d%02d" % (999,1,1)
But the format and length for these numerical strings is fixed.