Remix.run Logo
bigstrat2003 4 days ago

I think that advice makes sense in the context of cryptography, where the consequences for getting it wrong can be quite serious indeed. I don't think it holds true for something as unimportant as a date parsing library.

poink 4 days ago | parent | next [-]

Correct date handling (including parsing) can be monumentally important. Imagine an app that reminds people when to take their medications, for example

what 4 days ago | parent | next [-]

You typically take medication at a set time every day. You don’t need to parse dates for that.

poink 4 days ago | parent | next [-]

1) Dates are often stored as strings, so parsing them correctly is a necessary component of storing them. Also, those dates need not be simple app state. They could come from an API provided by your doctor/pharmacy

2) Many people (especially the elderly) take enough medications on different schedules that managing them all would be a significant cognitive load for anyone

It’s just an illustrative example, though. My point is getting dates right (including parsing their string representations) often matters quite a bit. If you disagree, let’s argue about that rather than quibble about the minutiae of the example

4 days ago | parent | prev [-]
[deleted]
computerthings 4 days ago | parent | prev [-]

[dead]

leptons 4 days ago | parent | prev [-]

A lot of cryptography relies on dates, time, etc.