pelya,

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

MonkderZweite,

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

vale,

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

ijmacd.github.io/rfc3339-iso8601/

sartalon,

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

vale,
EnderMB,

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…

CoderKat, (edited )

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.

Wes_Dev,

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

clif,

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

Empricorn,

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, (edited )

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,

Holy shit teach me your ways how do I do that

can,

Are you familiar with AHK at all?

lukewarm_tauntaun,

Nope not yet

Agent641, (edited )

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

; Recommended for performance and compatibility with future AutoHotkey releases.

; ; 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.

lukewarm_tauntaun,

I love you.

Agent641,

💕

mvirts,

Much date. Very logic.

Remavas, (edited )
@Remavas@programming.dev avatar

Glad I can count my own country, Lithuania, among the enlightened. https://programming.dev/pictrs/image/1e398790-5848-431e-98b0-61a9e6712158.png

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

problematicPanther, (edited )
@problematicPanther@lemmy.world avatar

where’s that? somewhere in africa?

/s because apparently it’s not implied

velox_vulnus,

Are you from the US? This is a legit question…

problematicPanther,
@problematicPanther@lemmy.world avatar

I seem to have dropped my /s. But yes.

Iron_Lynx, (edited )

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.

Default_Defect,
@Default_Defect@midwest.social avatar

Soo… yes to being in Africa?

/s

ViscloReader,

Which color is which?

Remavas,
@Remavas@programming.dev avatar

(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,

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

CoderKat,

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,

YYYY-MM-DD:HH:MM:SS

Ravi,

YYYY-MM-DD:HH:MM:SS+TZ

Kata1yst,
@Kata1yst@kbin.social avatar

RFC3339! It's like ISO8601, but good!

Unaware7013,

This, but all run together.

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

naught,

I just go for a unix timestamp and use terminal/filemanager to sort by or display the datetime

Unaware7013,

Are you talking epoch? I don't care for that mainly because it's not human readable. I see the use for it, but I struggle with it in practical use.

naught,

Yep. I mostly like datetimes for simple sorting. If it needs to be human readable iso is the way to go tho.

umbraroze,
@umbraroze@kbin.social avatar

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.

cryptix,

Sorting by date would be so much better with yyyymmdd .

JohnDClay,

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

Pulptastic,

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

WetBeardHairs,

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

CapeWearingAeroplane, (edited )

“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.

itslilith,
@itslilith@lemmy.blahaj.zone avatar

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

12-04-08

good luck figuring out what that is

rchive,

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.

bamboo,

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

Gregorech,

Is that why the military uses that format?

ODuffer,
@ODuffer@lemmy.world avatar

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

seth, (edited )

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).

scrubbles,
@scrubbles@poptalk.scrubbles.tech avatar

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

Crackhappy,
@Crackhappy@lemmy.world avatar

No. No you can’t.

ByteJunk,
@ByteJunk@lemmy.world avatar

The truth. Amen

geissi,

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

ASeriesOfPoorChoices,

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

geissi,

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

ProvokedGamer,
@ProvokedGamer@lemmy.ca avatar

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.

Kusimulkku,

I hope you mean YYYY, not just YY

Igloojoe,

Should just burn it all down and do. MM/YY/DD

paultimate14,

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.

bleistift2,

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“.

bizzle,
@bizzle@lemmy.world avatar

So when you say it out loud you say 7th September, and not September 7th?

bleistift2,

I say “The 7th of September” because I was taught British English in school.

ProvokedGamer,
@ProvokedGamer@lemmy.ca avatar

Americans still use it in rare cases, like the Fourth of July

bzarb8ni,

I’m not kidding when I ask: are there really a lot of people using MM/DD/YYYY??

jwhardcastle,

Almost 350 million of us morons down south of you.

bzarb8ni,

🤣

Archlinuxforever,
@Archlinuxforever@lemmy.3cm.us avatar

Using a different date format that means the exact same thing anyway does not make you a moron.

GingeyBook,

But there are a lot of other things that do 👈😎👈

biscuitswalrus,

My favourite thing is that files are sorted automatically by date if you use yyyy-mm-dd. Sometimes there are just practical reasons.

clif,

Pretty much every American I’ve ever met. Dates on drivers license, bank info, etc - all in MM/DD/YYYY … or even just MM/DD/YY

I regularly confuse people with YYYY-MM-DD

CM400,

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.

bzarb8ni,

Thanks!

takeda,

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.

HeckGazer,

You only think it fits with how it’s read in English because that’s how you grew up saying it so it sounds natural to you. Your experience is not universal, and is in fact, a minority.

sobanto, (edited )

It’s how it is read in English (simplified) aka american english. Brittish english doesn’t do this nonsense, the talk in the correct format (first of january etc.).

(I’m sorry if i made some mistakes, english is my second language)

tiredofsametab,

Japan is YYYY-MM-DD, but when we talk about dates where a year is unneeded, we just cut it off which leaves it in the US standard format of MM-DD, much to the annoyance of non-US foreigners living here.

TheImpressiveX,
@TheImpressiveX@lemmy.ml avatar

ISO 8601 format is the best (YYYY-MM-DD).

jzb,

Came here to say this. I try to name all my docs in the YYYY-MM-DD-descriptive-name.ext format.

Buttons, (edited )
@Buttons@programming.dev avatar

I can see some advantages of that.

I’m American though, so YYYY-DD-MM is the best I can do.

mmagod,

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

sukhmel,

I hope that the comment you answer to was ironical. >!Otherwise there’s no hope for us 😰!<

mmagod,

haha yeah. i just assumed they were kidding, but if not… yikes!

AMillionNames, (edited )

Best nomenclature for sorting.

DAMunzy,

Used to be my account name on a different website social media aggregator.

dillydogg,

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.

CorrodedCranium,
@CorrodedCranium@leminal.space avatar

I do prefer the abbreviated month with the yyyy mmm dd format. It makes things relatively easy to sort but you also don’t have to worry about confusing others if you are referring to the 10th month or day for example.

Teritz,

For Excel 100%

drdabbles,
@drdabbles@lemmy.world avatar

The only correct format. Least to most specific.

DeadMartyr,

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.

starman2112,
@starman2112@sh.itjust.works avatar

ISO 8601 baby

Though it ought to be a prefix, not a suffix

PilferJynx,

Yeah this method is superior for digital filing. I can’t imagine the sorting clusters I’d have to go through to find what I want any other way

numanair,

You mean as a prefix, right?

Shayreelz,

Their assumption is that the filename is the same otherwise e.g. myNotes20231122.txt

numanair,

Oh I see, thanks. Good alternative to final3_release2.

CapeWearingAeroplane,

Came here to say this, I use DD.MM.YY in day-to-day stuff, but for files it’s either YYYY_MM_DD or YY_MM_DD, the automatic ordering is beautiful

LordKitsuna,
Hovenko,
@Hovenko@iusearchlinux.fyi avatar

MMDDYY is just a mess. Otherwise… US problems, I don’t care…

okr765,

Not to us burgerland citizens! 🇺🇲🇺🇲🦅🦅💥💥

Hovenko, (edited )
@Hovenko@iusearchlinux.fyi avatar

The most American statement ever :D

Edit: I am taking it back and admitting defeat. America != US. I am ashamed.

Algaroth,

Massive trucks that increase fatalities. Bald eagles that are endangered because of Americans, and sound like red tailed Hawks for some reason. Fireworks that are more heavily regulated than guns.

I love Americans but your country is run like a ball of yarn in a box of cats.

Cosmonauticus,

Bald eagles aren’t endangered anymore.

Plus being American and having lived abroad every country has their bullshit. You just hear about America’s shit because it has the most popular forms of mass media.

Dumbasses are plentiful everywhere

Algaroth,

I don’t like all Americans and you are the kind I don’t. You’re an idiot. I was going to say imbecile but I doubt you know what that means.

Cosmonauticus,

This will surely keep me up at night.

Didn’t know saying no country is perfect was such a controversial statement

Algaroth,

Getting irrationally defensive over facts is the part no one likes. Large trucks kill people at a higher rate. Fact. Bald eagle is still endangered. Red tailed hawk which is the bird that makes the actual sound, endangered. Many states in the us regulate fireworks harder than guns. Acknowledge your faults.

Cosmonauticus, (edited )
Algaroth,

deleted_by_author

  • Loading...
  • Cosmonauticus,

    You said BALD EAGLES are endangered. They’re not. They’re not dieing anymore. Their numbers are healthy. Bringing up global warming is YOU not being able to admit you’re wrong. No one denied anything about gun laws or traffic deaths from trucks which is why I said no country is perfect. Which again is a pretty nuanced response

    ASeriesOfPoorChoices,

    Welcome to Lemmy. Enjoy your stay.

    Gabu,

    This meme implies there’s an equal battle between MM/DD/YY and DD/MM/YY, which is nonsense. Much like imperial units, only 'murica uses MM/DD/YY.

    SqueezeMeMacaroni,

    Liberia and Myanmar also use imperial units, but they’re both starting to move towards metric in recent years so soon the US truly will be alone in that

    ehsan301,

    But 'murica is big.

    ElBarto,
    @ElBarto@sh.itjust.works avatar

    Only slightly bigger than Australia and Western Australia is nearly twice the size of Texas…

    jamhandy,

    When talking about cultural mindshare I’d argue that the quantity of people matters more than the space they’ve been packed into

    emptiestplace,

    Mercator would like a word.

    ElBarto,
    @ElBarto@sh.itjust.works avatar

    Mercator can say whatever it wants, it’s not involved in this discussion.

    JackbyDev,

    Oi guvnah, ow many stone chu weigh?

    Gabu,

    Only one, but it has my exact weight

    NickwithaC,
    @NickwithaC@lemmy.world avatar

    If you look at the calendar, you’ll see that we are not in 1900 anymore.

    No one I know measures their own weight in imperial.

    toastal,

    Talking about fuel efficiency in miles per liter 🤣

    Karyoplasma,

    I have 2 stones if that’s what you’re asking.

    disconnectikacio,

    YYYY-MM-DD in Hungary too, that us shit is totally non logical, i cant get used to it

    rdri,

    This is literally the most logical method to name a date in text.

    joneskind,
    @joneskind@lemmy.world avatar

    In what text?

    In French we say “14 juillet 1789”

    We don’t even say “nth day of”

    rdri,

    In a text like “the research started at 2003-01-24”, or pretty much in any other text where you need to convey all 3 elements.

    I bet you also don’t say “14 07 1789”, because that’s what MM format means.

    joneskind,
    @joneskind@lemmy.world avatar

    You bet wrong

    We write AND say “La Révolution a démarré le 14/07/1789” or “La Révolution à démarré le 14 juillet 1789”

    Spoken numbered month are usually used in an administrative context, to ease the work of our contact.

    rdri,

    Oh that’s right, the spoken administrative context. Same in my dd-mm-yyyy county actually. Still, I find it less intuitive than the logical yyyy-mm-dd when understanding written text.

    SendMePhotos,

    Fuckin wait until you hear how many feet are in a mile. You all should’ve waterboarded us harder while we were a young country.

    ASeriesOfPoorChoices,

    FIvE tOMaToeS

    lichtmetzger,

    It’s very easy to sort by this format, makes perfect sense.

    CommanderCloon,

    Easier to sort by YYYY-MM-DD than MM-DD-YYYY tho

    lichtmetzger,

    Dammit, I misread here. Of course, the US format is terrible.

    Algaroth,

    We do that in Sweden as well. Our social security numbers are that plus 4 unique numbers. The beers I send out to stores have yyyy-mm-dd printed at the bottom.

    sukhmel,

    So no more than 10 thousands of Swedes may get an SSN at the same day (or be born at the same day even 🤔)?

    Algaroth, (edited )

    Hasn’t been a problem so far. I’m guessing maybe they will add numbers or use letters if it comes up. They recentled started doing that on license plates.

    darkbaron202,

    It actually makes sense when you put YYYY/MM/DD in filenames as they will be sorted pretty neat (ex: reports)

    Thranduil,

    Yeah for a lot of files you probably would sort by year in the end

    bitwolf,

    It is arguably the best way to name large sets of indexed files on a filesystem.

    morrowind,
    @morrowind@lemmy.ml avatar

    Files already have computer readable dates that can be used to sort and organize them

    bitwolf,

    In certain instances that may not always be available.

    One example I can think of is when browsing on a NAS.

    puppy,

    Japan’s way, you mean?

    bitwolf,

    Yes, YYYY/MM/DD

    MathiasTCK,

    It sorts

    dQw4w9WgXcQ,

    I think that the best argument is that it makes sense when combined with hours minutes and seconds.

    yyyy/MM/dd hh:mm:ss

    Goes from large to small units.

    deadcatbounce,
    @deadcatbounce@reddthat.com avatar

    When you’re naming a file, you can’t use anything else.

    LemmyKnowsBest,

    You’re not wrong. through much trial and error in the 1990s I learned this was the most efficient & accurate & chronologically searchable way to date things.

    UserNotFound,
    @UserNotFound@lemmy.world avatar

    YYYY-MM-DD for files, DD-MM-YYYY for normal use

    SendMePhotos,

    Wtf why

    bamboo,

    Agreed, YYYY-MM-DD should be normal use

    Gabu,

    Because for 99.99% of all situations, you’d already know what year and month it is, so the most readily available piece of information should be the day.

    Zanz,

    If you already know the year and month why write it. ISO or month day are the two most reasonable. You need to zoom in not give yourself a list of options and then randomly pick one later.

    noobnarski,

    So its possible to properly sort by date?

    SendMePhotos,

    A proper date sort would be YYYYMMDD

    Kryptenx,

    deleted_by_author

  • Loading...
  • SendMePhotos,

    Because in short, it’s alphabetical. It will always be in order by year, then month, then day. Literally like how a clock goes HH:MM:SS it’s the same thing as YY:MM:DD the right side ticks the fastest. It’s in order by hour (year) then minute (month) then second (day). SAME SAME WHY NOT

    Spoilt, (edited )

    YYYYMMDD for files
    DDDD DD for normal use

    baatliwala,

    YYYY-MM-DD for everything digital, DD-MM-YYYY for everything IRL.

    Goldmaster,

    Iso date format. Anything to do with photos is best to have in this format at the start of the filename.

    qwerty_bastard,

    Iso date format. Anything to do with photos is best to have in this format at the start of the filename.

    Fixt.

    CheeseToastie,

    It also means that by default it’ll sort by newest

    lemmiter,

    I propose the use of MYDYDM format. So, October 15, 2023 will be written as 121350. Just to make it as confusing as possible.

    captain_aggravated,
    @captain_aggravated@sh.itjust.works avatar

    Welp. I need a bath now.

    CouncilOfFriends,

    And then convert that to hexadecimal, making it 1DA06

    Engywuck,

    Amazing

    sukhmel, (edited )

    We’re also unduly forgetting about truly little endian date format: DD/MM/YYYY, for instance 52/11/3202 for this Saturday

    Also we could just sort the numbers and omit leading zeroes, that way we can save some space, the same date would be 1122235

  • All
  • Subscribed
  • Moderated
  • Favorites
  • memes@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/kbin/kbin/vendor/symfony/var-dumper/Caster/ClassStub.php on line 52

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes) in /var/www/kbin/kbin/vendor/symfony/http-kernel/EventListener/ErrorListener.php on line 236