Hacker News new | ask | show | jobs
by atoav 1479 days ago
The date example is a good one. No one has fun by choosing their own date format. This is putting the burden of choice onto the user. They might like to think about some map stuff and now they have to think about data format stuff.

Of course projects like these have to strike a balance between the strictest bureaucratic nightmare and such a structure so loose that people are overburdened by the available options at every corner.

I think a lot of that complexity can (and should!) live in the tools themselves. Who cares about a date format, when the tool that creates it offers a date picker or extracts the correct date from the meta data of an image? The date format in the backend should be fixed and then you should offer flexibility in the frontend for user input.

1 comments

> The date format in the backend should be fixed and then you should offer flexibility in the frontend for user input.

Agreed. However, it might be not so easy for historical dates, because doing it correctly requires great diligence on the part of the tool developer as well as from the user to choose the correct calendar system. For example:

  Q: What is the correct representation of the date of Caesar's death, 15 March 44 BC in ISO-8601?

  A: -0043-03-13

  Why? -- Ancient dates are typically given according to the Julian calendar excluding a year 0, but ISO-8601 uses a proleptic Gregorian calendar including a year 0.
This is a good point in a general sense, but I don't think it would be a problem in this particular case for the date some imported OSM data was sourced, which is similar to the "date accessed" for a website in a bibliography.
I had the Open Historical Map sub-project in mind, which currently supports only ISO-8601.[1]

[1] https://wiki.openstreetmap.org/wiki/Open_Historical_Map/Tags...

In Java and Javascript, months are 0-based, so October is 9. Geez, imagine forcing people to write "October 15, 2019" as "2019-09-15"
Yeah, as it already is an imposition to use 10 for what is called "Month Eight" (from Lat.: octo = 8).
Glad to hear I'm not the only one. A switch flipped in my brain once I realized this and now I routinely mix up October and August.

Would it really have been too much to ask that July and August come after December?!

  Q: Why do software engineers confuse Halloween and Christmas?
  A: Because Oct. 31 = Dec. 25
July was renamed away from Quintilis ( the fifth month of the Roman calendar )

So yes, a bit much.

I am one of those guys who use ISO 8601 for everything. It just makes the most sense to me. But I would not force ot onto my users.