3 ms·
> * Keep that schema file updated by hand every time something like Sudan breaking in two happens (no). There is a lot of use for libraries dealing with time a
by avmich 9y ago
> * Keep that schema file updated by hand every time something like Sudan breaking in two happens (no).
There is a lot of use for libraries dealing with time and dates. When you want to cover all cases, at some point you get to the situation when you have to allow variable number of seconds in a minute - not always 60, but sometimes 59 or 61, or may be even different numbers. And you don't know in advance - for arbitrary long future - which minutes will have which number of seconds.
So, for your timekeeping system to maintain precision, you have to allow external updates for when a minute will be considered non-60 seconds.
And those cases could happen more often than changing a list of valid country codes.
What would you do with time then?
- crdoconnor 9y agoIdeally, use a library that intelligently parses dates as part of a turing complete validator.
- avmich 9y agoThe point is that you can't always avoid scenarios with keeping something updated. List of countries is another example.
- crdoconnor 9y agoThe point isn't to avoid it. Of course it's inevitable - that was my point! The point is to use code to validate instead of some markup so that the programmer can use their judgment about how it should be delegated. I wrote some example code below that shows how you can validate with list of countries in such a way that no code changes will be required when the list changes.