this post was submitted on 22 Nov 2023
954 points (95.9% liked)

Memes

45581 readers
1 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] pelya@lemmy.world 512 points 2 years ago (10 children)

YYYY-MM-DD is the only acceptable date format, as commanded by ISO 8601.

[–] clif@lemmy.world 82 points 2 years ago

"There shall be no other date formats before ISO8601. Remember this format and keep it as the system default"

[–] Wes_Dev@lemmy.ml 51 points 2 years ago

Largest to smallest unit of time. It just makes sense.

[–] cryptix@discuss.tchncs.de 43 points 2 years ago

Sorting by date would be so much better with yyyymmdd .

[–] Empricorn@feddit.nl 22 points 2 years ago (1 children)

If you have years of files named similarly with the date, you will love the ISO standard and how it keeps things sorted and easy to read.

[–] Agent641@lemmy.world 19 points 2 years ago* (last edited 2 years ago) (2 children)

I have autohotkey configured to insert the current date in ISO 8601 format into my filenames on keyboard shortcut for just this reason. So organized. So pure.

[–] lukewarm_tauntaun@feddit.de 7 points 2 years ago (1 children)

Holy shit teach me your ways how do I do that

[–] Agent641@lemmy.world 7 points 2 years ago* (last edited 2 years ago) (1 children)

Download Autohotkey, and create a new script. Paste these shortcuts into the script and restart the script:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

; #Warn ; Enable warnings to assist with detecting common errors.

SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

:R*?:ddd::

FormatTime, CurrentDateTime,, yyyy-MM-dd

SendInput %CurrentDateTime%

return

:R*?:dtt::

FormatTime, CurrentDateTime,, yyMMddHHmm

SendInput %CurrentDateTime%

Return

Now, if you type 'ddd' on your keyboard, the current date will be typed out, eg '2023-11-23'.

If you type 'dtt' tgen the datetime stamp will be typed out in YYMMDDhhmm format, eg 2311231012

There are so many cool things you van do with AHK to make your work more productive. For example, rather tgan typing your email address a billion times, add the shortcut:

::add1::your.email.address@domainname.com

And then you can type 'add1' and hit space, and your email address will be typed out in full. Of course, the string 'add1' can be whatever you want.

[–] mvirts@lemmy.world 2 points 2 years ago

Much date. Very logic.

[–] Remavas@programming.dev 21 points 2 years ago* (last edited 2 years ago) (3 children)

Glad I can count my own country, Lithuania, among the enlightened.

EDIT: Source of the picture: https://en.m.wikipedia.org/wiki/File:Date_format_by_country_NEW.svg

[–] ViscloReader@lemmy.world 11 points 2 years ago (1 children)
[–] Remavas@programming.dev 5 points 2 years ago

(This doesn't consider the separator) Cyan - DD/MM/YY Magenta - MM/DD/YY Yellow - YY/MM/DD The other ones are mixes of those two colors, so e.g. the US is MM/DD/YY and YY/MM/DD (apparently).

Also just noticed I didn't attribute this picture, I'll edit my comment.

[–] stealth_cookies@lemmy.world 6 points 2 years ago (1 children)

Canada threw up their hands and said, "Fuck it, I don't care, use whatever date format you like."

[–] CoderKat@lemm.ee 4 points 2 years ago

We are ridiculously inconsistent in Canada. I've seen all 3 of the most popular formats here (2023-11-22, 11/22/2023, and 22/11/2023) in similarish amounts. Government forms seem to be increasingly using RFC 3339 dates, but even they aren't entirely onboard.

[–] TrismegistusMx@slrpnk.net 12 points 2 years ago (4 children)
[–] umbraroze@kbin.social 18 points 2 years ago

Funny thing, in ISO 8601 date isn't separated by colon. The format is "YYYY-MM-DDTHH:MM:SS+hh:mm". Date is separated by "-", time is separated by ":", date and time are separated by "T" (which is the bit that a lot of people miss). Time zone indicator can also be just "Z" for UTC. Many of these can be omitted if dealing with lesser precision (e.g. HH:MM is a valid timestamp, YYYY-MM is a valid datestamp if referring to just a month). (OK so apparently if you really want to split hairs, timestamps are supposed to be THH:MM etc. Now that's a thing I've never seen anyone use.) Separators can also be omitted though that's apparently not recommended if quick human legibility is of concern. There's also YYYY-Wxx for week numbers.

[–] Ravi@feddit.de 11 points 2 years ago (1 children)
[–] Kata1yst@kbin.social 7 points 2 years ago

RFC3339! It's like ISO8601, but good!

[–] jlh@lemmy.jlh.name 10 points 2 years ago (1 children)

YYYY-MM-DDTHH:MM:SS.SSSSSSSSSZ

[–] Unaware7013@kbin.social 5 points 2 years ago

This, but all run together.

I write files/reports to disk a lot from scripts, so that's my preferred format.

[–] geissi@feddit.de 9 points 2 years ago (1 children)

For file names, absolutely.
When I’m asking what date it is I typically know the current year.

[–] ASeriesOfPoorChoices@lemmy.world 4 points 2 years ago (1 children)

Well la-tee-dah, look at mister not-shitfaced-every-day here, bragging like a big man

[–] geissi@feddit.de 1 points 2 years ago

I can lie under the table, puking my guts out and still remember the year.
You need more training, son.

[–] Gregorech@lemmy.world 3 points 2 years ago (2 children)

Is that why the military uses that format?

[–] scrubbles@poptalk.scrubbles.tech 5 points 2 years ago (1 children)

Yep, you can easily sort it just because of the ordering. It's a full standard

[–] ODuffer@lemmy.world 2 points 2 years ago (1 children)

In a GMP laboratory it's 22NOV2023 no ambiguity.

[–] MonkderZweite@feddit.ch 2 points 2 years ago

It's alphabetically sortable too. Name backups like this.

[–] ByteJunk@lemmy.world 2 points 2 years ago

The truth. Amen