this post was submitted on 26 Jan 2025
565 points (95.9% liked)

196

16823 readers
2798 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 2 years ago
MODERATORS
565
ISO 8601 ftw rule (gregtech.eu)
submitted 1 day ago* (last edited 1 day ago) by lena@gregtech.eu to c/196@lemmy.blahaj.zone
 

!iso8601@lemmy.sdf.org gang, rise up

top 50 comments
sorted by: hot top controversial new old
[–] shortrounddev@lemmy.world 4 points 6 hours ago (1 children)

How is day smaller than month? There are up to 12 values for month, but up to 31 for days

[–] lena@gregtech.eu 11 points 6 hours ago

It's sorted by the length of time, so a day is shorter than a month.

[–] random@lemmy.blahaj.zone 11 points 8 hours ago

I use ss/mm/hh/dd/MM/YYYY

t.european

[–] dkt@lemmy.ml 15 points 17 hours ago

finally a correct version of this diagram

[–] lazynooblet@lazysoci.al 45 points 1 day ago (1 children)

I work with international clients and use 2025-01-26 format. Without it.. confusion.

[–] ByteJunk@lemmy.world 26 points 22 hours ago

That's an ISO date, and it's gorgeous. It's the only way I'll accept working with dates and timezones, though I'll make am exception for end-user facing output, and format it according to locale if I'm positive they're not going to feed into some other app.

[–] fushuan@lemm.ee 77 points 1 day ago (1 children)

"Europe", as if there weren't several languages in Europe with different date formats per language...

[–] Mr_Blott@feddit.uk 75 points 1 day ago (16 children)

None of which start with the month because that would be fuckin stupid

load more comments (16 replies)
[–] Bo7a@lemmy.ca 31 points 1 day ago (3 children)

I don't know why anyone would ever argue against this. Least precise to most precise. Like every other number we use.

(I don't know if this is true for EVERY numerical measure, but I'm sure someone will let me know of one that doesn't)

load more comments (3 replies)
[–] derpgon@programming.dev 19 points 1 day ago (1 children)

All my homies hate ISO, RFC 3339 for the win.

[–] amon@lemmy.world 20 points 1 day ago* (last edited 22 hours ago) (2 children)

All my homies hate ISO

Said no-one ever?

EDIT: thanks for informing me i now retract my position

[–] namingthingsiseasy@programming.dev 31 points 22 hours ago (6 children)

Nah, ISO is a shit organization. The biggest issue is that all of their "standards" are blocked behind paywalls and can't be shared. This creates problems for open source projects that want to implement it because it inherently limits how many people are actually able to look at the standard. Compare to RFC, which always has been free. And not only that, it also has most of the standards that the internet is built upon (like HTTP and TCP, just to name a few).

Besides that, they happily looked away when members were openly taking bribes from Microsoft during the standardization of OOXML.

In any case, ISO-8601 is a garbage standard. P1Y is a valid ISO-8601 string. Good luck figuring out what that means. Here's a more comprehensive page demonstrating just how stupid ISO-8601 is: https://github.com/IJMacD/rfc3339-iso8601

load more comments (6 replies)
[–] sga@lemmings.world 12 points 23 hours ago (1 children)

if i am not wrong, it is because essentially both are same (slight differences in what is allowed and what is not, https://github.com/IJMacD/rfc3339-iso8601), but RFC is more free as in freedom

load more comments (1 replies)
[–] 6mementomorib@lemmy.blahaj.zone 6 points 20 hours ago (1 children)

i never saw year first in Europe.

[–] Walk_blesseD@lemmy.blahaj.zone 26 points 19 hours ago

You're reading the post backwards.

[–] j4k3@lemmy.world 96 points 1 day ago

MM ≠ MM !!!

[–] istdaslol@feddit.org 24 points 1 day ago

My stupid ass read this top to bottom and I was confused why anyone would start with seconds

[–] Maggoty@lemmy.world 12 points 1 day ago (1 children)

Mmm US military date and time is fun too.

DDMMMYYYYHHMM and time zone identifier. So 26JAN20251841Z.

So much fun.

[–] jagungal@lemmy.world 5 points 10 hours ago (2 children)

So virtually human unreadable and the letters make machine readability a pain in the ass?

[–] Maggoty@lemmy.world 1 points 3 hours ago

As my friend used to say, there's dumb and then there's Army Dumb.

[–] boonhet@lemm.ee 5 points 9 hours ago (1 children)

Honestly look very readable to me, though I'm not sure on the timezone bit. Maybe they left it out? Ohterwise it's 26th of January 2025, 18:41

It's gonna be problematic when there's 5 digit years, but other than that it's... not good, but definitely less ambiguous than any "normally formatted" date where DD <= 12. Is it MM/DD or DD/MM? We'll never fucking know!

Of course, YYYY-MM-DD is still the king because it's both human readable and sortable as a regular string without converting it into a datetime object or anything.

[–] jagungal@lemmy.world 6 points 9 hours ago* (last edited 9 hours ago) (1 children)

All you'd have to do to make it much more readable is separate the time and the year with some kind of separator like a hyphen, slash or dot. Also "Z" is the time zone, denoting UTC (see also military time zones)

[–] boonhet@lemm.ee 3 points 6 hours ago* (last edited 6 hours ago)

Oh, duh. It's why all my timestamps have Z's in the database lmao

Thing is, you're right that the separation would help, but this is still way less ambiguous that MM/DD vs DD/MM if you ask me.

[–] myrrh@ttrpg.network 28 points 1 day ago (2 children)

YYYY.MM.DD HH.MM.SS, as eru ilúvatar intended

[–] lud@lemm.ee 1 points 2 hours ago

YYYY-MM-DD HH:MM:SS

Ftfy

load more comments (1 replies)
[–] azi@mander.xyz 0 points 11 hours ago (1 children)

Hot take: 2025-Jan-27 is better than 2025-01-27 in monolingual contexts.

[–] bigboismith@lemmy.world 29 points 10 hours ago

The beautiful part of 2025/01/27 is that it can inherently be sorted without formatting.

load more comments
view more: next ›