▲ | kccqzy 4 days ago | |
Do your users type in such dates? No? Problem solved. The benefit of DIY parsing is to make the problem simple by restricting it to the set of plausible inputs your users will want your code to handle, not to make a highly general library. The right takeaway for juniors is to stop over-complicating things. | ||
▲ | bigstrat2003 4 days ago | parent [-] | |
> Do your users type in such dates? No? Problem solved. This is spot on. So many of the "X is really hard and your intuition is wrong" takes ignore the fact that most people are not building something which needs to be usable in every country, language, and culture on this earth. Yes, human behavior is insanely complex, but for any given application you can probably ignore huge swathes of it. |