Deep object cloning/inspection, URL parsing/generator. Date arithmetic. Locking. Caching. Testing. Templating. I've had to rip so many of these out for being fundamentally unworkable and often wrongheaded solutions to already solved problems that it's become a cliche in my career.
I know everyone likes to spend a day writing a date/time library, but when you need to develop a full stack app. You just dont have time to do everything from scratch.
These are decisions you have to make.
> leftpad
Yes, there is a difference between these.
But the second one gets you closer to the mythical perfection called "serverless" because it uses so many different servers you can't keep track of them all.
Datetime libraries are complex because they need to do things like deal with the fact that North Korea switched Timezones last year, that Fiji is changing their DST dates this year and other crap. We get about 3 to 10 releases of the TZ database every year and you'll probably want the updates as quickly as possible in your Datetime library to deal with timezoned data correctly, otherwise your Customer from Fiji will find that you aren't turning up for the meeting because you left an hour earlier believing the customer wasn't turning up at all. And then you have to deal with dates in the past where there might be possible changes to the entire calendar! Or different calendars such as the Japenese, Chinese or Jewish years.
I don't think it's valid to suggest that leftpad and datetime libraries are even on the same order of magnitude of engineering complexity.
Do you build? Or do you buy into the support level, the features, the bugs, the availability, the security, etc.
> Software that you write is software that you have to maintain. Forever. Don’t succumb to NIH when there’s a well supported public solution that fits just as well (or even almost as well).
While this idea has a lot of merit, it's not as black-and-white. (Most things in the world aren't, too.)