I think you might have missed something too.
I was of course adding evidence to Poe's Law.
If a function you need is available from the OS / Framework you are targeting, I can think of no possible reason to re-invent the wheel and implement the function yourself.
Plenty of reasons (in the general case, not necessarily for date functions):
- Your app works on multiple platforms and you already have an implementation and consistent behaviour is desirable.
- The function is known to be buggy or have unpredictable results.
- The function is not performant enough for your use case.
- The function requires and/or returns data in a different format to that you are using in your program, and converting the data back and forth is more work than just reimplementing the function.
- The function is only available as part of a larger framework that you don't want to create a dependency on.
- The function has some other undesirable side effects, like triggering a network call or disk access unnecessarily
- The spec
requires the function to produce certain results. The results of the OS call look like they'll produce the right result, but can you be sure?
etc
9 times out of 10 a programmer reimplementing something is wrong, but not always.