this post was submitted on 01 May 2025
1071 points (96.9% liked)
Comic Strips
16304 readers
2133 users here now
Comic Strips is a community for those who love comic stories.
The rules are simple:
- The post can be a single image, an image gallery, or a link to a specific comic hosted on another site (the author's website, for instance).
- The comic must be a complete story.
- If it is an external link, it must be to a specific story, not to the root of the site.
- You may post comics from others or your own.
- If you are posting a comic of your own, a maximum of one per week is allowed (I know, your comics are great, but this rule helps avoid spam).
- The comic can be in any language, but if it's not in English, OP must include an English translation in the post's 'body' field (note: you don't need to select a specific language when posting a comic).
- Politeness.
- Adult content is not allowed. This community aims to be fun for people of all ages.
Web of links
- [email protected]: "I use Arch btw"
- [email protected]: memes (you don't say!)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Won't be true after 9999-12-31, however.
If I, my software, or my data last this long, I will have nearly 8000 years to resolve it. Which is to say, the year 9998 is going to get busy.
Oh no! The Y10K bug!
Can't wait for the Y40k bug, when Tyranids begin to infect our brains.
Bold of you to assume there isn't already a genestealer cult on Terra. Washington specifically.
That...would explain a lot
Can be solved with a small shellscript adding a leading zero to all filenames with the format.
If humanity survives until then, we can implement 9-digit dates and delay the problem until Y100K.
natural sort ftw
I’d be curious to see a sorting algorithm that doesn’t handle YYYYY-MM-DD with YYYY-MM-DD properly. If you drop the dashes you still get a proper numeric order. If you sort by component, you still get the proper order. Maybe a string sort wouldn’t? Off the top of my head the languages I’m thinking either put longer strings later, giving us the proper order, or could put 1YYYY- ahead of 1YYY-M so maybe string sorting is the only one that’s out.
Lexical sorting (string sorting/alphabetical order sorting) is what I believe they were referring to when talking about file names.
The fact that you don't have to do any parsing of the string at all, just do a straight character-by-character alphabetical sort, and they will be sorted by date, is a great benifit of this date scheme. That means in situations where no special parsing is set up (eg, in a File Explorer windows showing a folders contents sorted alphabetically) or where your string isn't strictly date only (eg, a file name format such as '2025-05-02 - Project 3.pdf') you can still have everything sorted by date just by sorting alphabetically.
Its this benifit that is lost when rolling over to 5-digit years.
I bet you could make a one liner to rename files with YYYY-MM-DD to 0YYYY-MM-DD fairly easily. Not a problem.
It's an easy fix at least, just check if you're comparing numbers on both sides and switch to a simple numerical sort.
I think Windows used to get this wrong, but it was fixed so long ago that I'm not even sure now.