logoalt Hacker News

christophiluslast Tuesday at 1:09 AM2 repliesview on HN

It is also sortable, which I think is the real advantage.


Replies

globular-toastlast Tuesday at 8:42 AM

I used to think this was really important, but what's the use case here?

If I'm writing a document for human consumption then why would I expect the dates to be sortable by a naive string sorting algorithm?

On the other hand, if it's data for computer consumption then just skip the complicated serialisation completely and dump the Unix timestamp as a decimal. Any modern data format would include the ability to label that as a timestamp data type. If you really want to be able to "read" the data file then just include another column with a human-formatted timestamp, but I can't imagine why in 2025 I would be manually reading through a data file like some ancient mathematician using a printed table of logarithms.

show 1 reply
privatelypubliclast Tuesday at 1:49 AM

As ling as you pad to two characters!