So your projects end up with their own "lib" of scattered time functions, possibly with new small bugs. I'd then rather have a proper well-tested and maintained library.

The "lib" one needs for date time functions is as good as non-existent.

But yeah, you will have to create tests for the codepath, instead of relying on the tests the library maintainers create.

Given the list of issues (most of which I had never heard of) that the library author describes with datetime, I think I trust his tests over the ones I’d write.

Given how many tests I see fail on 29th February at the companies I’ve been at, I don’t trust my colleagues’ tests either!

In a previous job where we had complete hell with an internal datetime lib under ambiguous ownership, a colleague joked that the original authors had taken early retirement when they turned 2,147,483,647 years old.