YYYY-MM-DD is the only acceptable date format, as commanded by ISO 8601.
ISO 8601, while great, has too many formats. May I introduce RFC 3339 instead?
That is what I love so much about standards: there are so many to choose from.
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.
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.
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.
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
Canada threw up their hands and said, βFuck it, I donβt care, use whatever date format you like.β
whereβs that? somewhere in africa?
/s because apparently itβs not implied
Lithuania is one of the Baltic States, conveniently squished between Russia & Belarus to the east and the sea to the west. Across that sea is Sweden. Youβll usually see three countries be the parts of this set. Lithuania is the southernmost of these three.
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.
This, but all run together.
I write files/reports to disk a lot from scripts, so thatβs my preferred format.
I just go for a unix timestamp and use terminal/filemanager to sort by or display the datetime
For file names, absolutely.
When Iβm asking what date it is I typically know the current year.
Well la-tee-dah, look at mister not-shitfaced-every-day here, bragging like a big man
Except the information is given least to most important, making verbal abbreviation difficult. Works great for file names though.
Thereβs this really cool shorthand where you drop the year because it seldom changes. Itβs called MM-DD
Yeah and if you need to know what year, you can just add it to the end like this MM-DD-YY.
Yep, you can easily sort it just because of the ordering. Itβs a full standard
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).
DD/MM/YY and YY/MM/DD are the only acceptable ones IMO. Throwing a DD in between YY and MM is just weird since days move by faster so they should be at one of the ends and since YY moves the slowest it should be on the other end.
Iβm not kidding when I ask: are there really a lot of people using MM/DD/YYYY??
Using a different date format that means the exact same thing anyway does not make you a moron.
I think most Americans do. Or at least it was taught that way in school when I was growing up. Maybe itβs because of the way we speak dates, like βOctober 23rdβ or βMay 9th, 2005β.
Regardless, the only true way to write dates is YYYY-MM-DD.
If you use DD/MM/YYYY, dumb sorting algorithms will put all of the 1sts of every month together, all of the 2nds of every month together, etc. That doesnβt seem very useful unless youβre trying to identify monthly trends, which is fundamentally flawed as things like the number of days in the month or which day of the week a date falls on can significantly disrupt those trends.
With MM/DD/YY, the only issue is multiple years being grouped together. Which may be what you want, especially if the dates are indicating cumulative totals. Depending on the data structure, years are often sorted out separately anyways.
YYYY/MM/DD is definitely the best for sorting. However, the year is often the least important piece in data analysis. Because often the dataset is looking at either βthis yearβ or βthe last 12 monthsβ. So the userβs eyes need to just ignore the first 5 characters, which is not very efficient.
If youβre using a tool that knows days vs months vs years that can help, but you can run into compatibility issues when trying to move things around.
The ugly truth no one wants to admit on these conversations is that these formats are tools. Some are better suited to certain jobs than others.
The only reason they place month as first is because it is fits how dates are read in English, but thatβs not a good reason to keep that format.
I grew up with DD.MM.YYYY. But I think, MM/DD makes sense in everyday usage. You donβt often need to specify dates with year accuracy. βJaneβs prom is on 7th Septemberβ β itβs obvious which year is meant. Then itβs sensible to start with the larger unit, MM, instead of DD.
Even in writing you see that the year is always given like an afterthought: β7th September**,** 2023β.
So when you say it out loud you say 7th September, and not September 7th?
I say βThe 7th of Septemberβ because I was taught British English in school.
Came here to say this. I try to name all my docs in the YYYY-MM-DD-descriptive-name.ext format.
I can see some advantages of that.
Iβm American though, so YYYY-DD-MM is the best I can do.
for me, the section that changes the most goes lastβ¦
in a whole year, the YYYY never changes, the MM changes only 12 timesβ¦ i never implementing the dayβ¦ thereβs only so many possibilities i could have had for saved files in June. i just go straight to description
I like that for files, but not for written documents. When I label things I try to use the most intuitive/least confusing way I can think of: DD mmm YYYY. This comment is posted on 23 NOV 2023, for example.
YYYY-MM-DD (honestly without dashes) is the only helpful format.
If you name all your files with this as a suffix then your files automatically sort versions of themselves in order when sorting by name.
Their assumption is that the filename is the same otherwise e.g. myNotes20231122.txt