Hacker News new | ask | show | jobs
by bee_rider 1066 days ago
> Lexical sort ordering without parsing the date string is a great property.

Why? Why is the date even a string in the first place? It ought to be internally represented as 3 numbers. Or a Unix timestamp. Convert it to months, days, and/or years as appropriate right before printing.

1 comments

Never use unix time stamp as date. You don’t know time zone, you need to calculate leap years (both days and seconds), summer time etc such a “date” would immediately morph into useless random number