Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
time: Parse does not detect bad days ("00" -> returns wrong date && err=nil) #17874
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
Working as intended. As the docs say,
Thanks for very swift reply, appreciated.
Mentioned "31" and "99" for February does return "day out of range" error (as expected) . "00" instead overflows in the previous month with 'nil' error (unexpected)
parse(...) DOES evaluate the validity of the day of the month.
time.Parse("02.01.2006", "29.02.1970") -> returns "day out of range" error
This "00" overflowing from "00.01.1970" into "31.12.1969" with 'nil' error appears - to me - inconsistent.