this post was submitted on 29 Oct 2023
1110 points (95.3% liked)
Memes
45608 readers
776 users here now
Rules:
- Be civil and nice.
- Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
why
YYYY-MM-DD is easier to get sorted since most significant number is on the left.
Least important it may be. But it is the most significant. This scheme follows the conventional scheme we follow while writing numbers - the most significant digit to the left and significance reducing as we move right.
The advantage of YYYY-MM-DD becomes when you add time to it in ISO-8601 or RFC 3339 format: YYYY-MM-DDThh:mm:ss. All the digits are uniformly decreasing in significance from left to right.
This becomes even more apparent if you are trying to sort by time - say, a stack of files, or datetime in a computer. Try doing this with any other scheme.