this post was submitted on 22 Nov 2023
1063 points (96.1% liked)

Memes

45139 readers
2216 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 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] pelya 573 points 9 months ago (11 children)

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

[–] clif 96 points 9 months ago

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

[–] [email protected] 56 points 9 months ago

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

[–] [email protected] 51 points 9 months ago

Sorting by date would be so much better with yyyymmdd .

[–] [email protected] 37 points 9 months ago (3 children)

ISO 8601, while great, has too many formats. May I introduce RFC 3339 instead?

https://ijmacd.github.io/rfc3339-iso8601/

[–] EnderMB 6 points 9 months ago

YES! I wish more people knew about RFC 3339. While I'm all for ISO 1601, it's a bit too loose in its requirements at times, and people often end up surprised that it's just not the format they picked...

[–] sartalon 6 points 9 months ago (1 children)

That is what I love so much about standards: there are so many to choose from.

[–] [email protected] 4 points 9 months ago* (last edited 9 months ago)

Huh, I've never noticed how much bloat was in ISO 8601. I think when most people refer to it, we're specifically referring to the date (optionally with time) format that is shared with RFC 3339, namely 2023-11-22T20:00:18-05:00 (etc). And perhaps some fuzziness for what separates date and time.

[–] [email protected] 24 points 9 months 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 20 points 9 months ago* (last edited 9 months 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.

[–] [email protected] 9 points 9 months ago (2 children)

Holy shit teach me your ways how do I do that

[–] Agent641 8 points 9 months ago* (last edited 9 months 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::[email protected]

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.

[–] [email protected] 2 points 9 months ago (1 children)
[–] Agent641 1 points 9 months ago
[–] [email protected] 3 points 9 months ago (1 children)
[–] [email protected] 2 points 9 months ago
[–] mvirts 2 points 9 months ago

Much date. Very logic.

[–] [email protected] 23 points 9 months ago* (last edited 9 months 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 13 points 9 months ago (1 children)
[–] [email protected] 5 points 9 months 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 6 points 9 months ago (1 children)

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

[–] [email protected] 5 points 9 months 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.

[–] [email protected] 9 points 9 months ago (1 children)

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

[–] ASeriesOfPoorChoices 4 points 9 months ago (1 children)

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

[–] [email protected] 1 points 9 months ago

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

[–] [email protected] 9 points 9 months ago (1 children)

Except the information is given least to most important, making verbal abbreviation difficult. Works great for file names though.

[–] [email protected] 16 points 9 months ago (1 children)

There's this really cool shorthand where you drop the year because it seldom changes. It's called MM-DD

[–] [email protected] 1 points 9 months ago (2 children)

Yeah and if you need to know what year, you can just add it to the end like this MM-DD-YY.

[–] [email protected] 9 points 9 months ago (2 children)

MM-DD-YY is the worst abomination I've seen yet

12-04-08

good luck figuring out what that is

[–] [email protected] 1 points 9 months ago

Wow it's my exact birthday. Good luck figuring out my age.

[–] [email protected] 1 points 9 months ago

Had a coworker who used MMDDYY with no dashes. Unless you knew it was very hard to figure out, since it could also just be a number that happened to be 6 digits, too. At least YYYY-MM-DD looks like a date generally.

[–] [email protected] 4 points 9 months ago* (last edited 9 months ago)

"I can reuse this old function if I just monkey-patch this other class to work with it, no one will have any issues understanding what's going on"

Edit: Thought this was the programmerhumor community. For context: A monkey-patch is when you write code that changes the behaviour of some completely different code when it is running, thus making its inner workings completely incomprehensible to the poor programmer using or reading your code.

[–] Gregorech 3 points 9 months ago (2 children)

Is that why the military uses that format?

[–] [email protected] 5 points 9 months ago (1 children)

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

[–] ODuffer 4 points 9 months ago (1 children)

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

[–] seth 3 points 9 months ago* (last edited 9 months ago)

In many of them but not all, because it's become convention and has been enshrined in their documentation policies. cGMP just requires that your quality management system has a policy in place that specifies how to document the date, and when exceptions are allowed (for instance, data printouts where YYYY-MM-DD is often the default).

It's also the reason some labs require you to initial/date every page of printed data, and some only require you to initial/date the first and/or last page. I've seen FDA auditors be okay with both, as long as you can justify it with something like: our documentation policy defines the printout as a copy of the original data, and the original data as what's stored on machine memory with electronic signature; versus: our documentation policy defines the original signed/dated data printout as the original data. In any case, it still has to follow 21 CFR part 11 requirements for electronic records & signatures, where the only date predicate rule example they give is 58.130(e), which itself is broad and only applies to non-clinical lab studies. It's notable that the date format 21 CFR 11 itself uses is actually Month D, YYYY, with no zero padding on the day.

And if you don't have IQ/OQ/PQ documentation showing how you locked down and validated the software's ability to maintain an audit trail you can't even use electronic records (or signatures).

[–] ByteJunk 2 points 9 months ago

The truth. Amen

[–] [email protected] 2 points 9 months ago

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