I'm playing with the Python datetime
module. I'm using it to determine the day of the week for a given date. Python conveniently raises a ValueError
when the date is invalid; e.g., for February 29 on non-leap years.
I have found that for years greater than 10,000 AD, ValueError
exceptions are raised for many dates that are not February 29. This leads me to consider that the datetime
module is not valid for dates that far in the future.
What is the range of valid dates for the datetime
module?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…