Email or username:

Password:

Forgot your password?
Top-level
silmaril

@0xabad1dea
If only there were libraries for date calculations that programmers could use!

4 comments
Dick Telder

@silmaril @0xabad1dea
yeah, I tried Python today.
(No, I have not dug deeper into what went wrong)

silmaril

@dtelder @0xabad1dea

This is a programming error. The library behaves exactly as documented:
docs.python.org/3/library/date

"For the datetime.strptime() class method, the default value is 1900-01-01T00:00:00.000: any components not specified in the format string will be pulled from the default value."

If you want your software to handle leap years correctly, you have to give it a chance to know which year we are talking about 😉

@dtelder @0xabad1dea

This is a programming error. The library behaves exactly as documented:
docs.python.org/3/library/date

"For the datetime.strptime() class method, the default value is 1900-01-01T00:00:00.000: any components not specified in the format string will be pulled from the default value."

silmaril

@dtelder
You're welcome!
Because you successfully triggered my curiosity 😁

@0xabad1dea

Go Up