News for hackers. Stuff that matters.
Re:Scientists rename human genes to stop MS Excel from misre... by owl57 on Thursday August 06, 2020 @10:41AM (#24071313)
I don't even know why anyone still uses this notation in today's connected world. 2020-08-06 is ideal. Russian standard (06.08.2020) is uglier (digits are not sorted by significance) but still unambiguous. But that slash horror? Why would anyone continue inflicting this on themselves and their peers!?
Re:Scientists rename human genes to stop MS Excel from misre... by reportgunner on Thursday August 06, 2020 @12:01PM (#24072195)
yes, YYYY-MM-DD HH:MM:SS is the only proper format.

It is sorted from the greatest unit (year) to the smallest unit (second). If you treat them as text and sort alphabetically they still get sorted from oldest to newest.

Other formats don't sort properly.

writing dd.mm.yyyy is like writing time ss:mm:hh

writing mm/dd/yyyy is like writing time mm/ss/hh

If I really have to put YYYY at the end of the date I use the 'dd-mmm-yyyy' format which excel translates based on client locale:

- 13-mar-2020 in enUS

- 13-bře-2020 in czech

Re:Scientists rename human genes to stop MS Excel from misre... by arrrg on Friday August 07, 2020 @02:37AM (#24079011)
I agree with everything you are saying about sorting and I frequently use YYYY-MM-DD, however I do want to make one point: DD.MM.YYYY does make some human sense as a date format since the year is very rarely important (and if the year is actually important often the day is so unimportant that it can be left out), the month is sometimes important and the day is often the most relevant piece of information.

So for any kind of practical planning that day first order makes some sense, but I wouldn’t die on a hill for it.

Re:Scientists rename human genes to stop MS Excel from misre... by reportgunner on Friday August 07, 2020 @03:32AM (#24079305)
I see where you are coming from, but I would argue that if you omit a part, it's not a date anymore.
Re:Scientists rename human genes to stop MS Excel from misre... by owl57 on Friday August 07, 2020 @11:08AM (#24082656)
Yes! It's not the first time I posted a rant on the net and found myself guilty of the sin the very next day. This time, a web app of mine has big tables full of dates, and I didn't quickly figure out a way to show the full date without too much clutter. So, I used "dd.mm" and postponed a finer design till next year. Guess what, this UI element hasn't changed in the next three years and today I finally stumbled on a bunch of records which really can't be deduced from context.
Re:Scientists rename human genes to stop MS Excel from misre... by qubex on Friday August 07, 2020 @10:40AM (#24082352)
It’s a cultural thing: if I’m not mistaken the traditional Chinese system is Y-M-D and always has been.
Re:Scientists rename human genes to stop MS Excel from misre... by sneak on Thursday August 06, 2020 @01:56PM (#24073594)
I suggest a literal T instead of a space, and don’t forget the timezone offset (or a literal Z).

ISO 8601 is great.

Re:Scientists rename human genes to stop MS Excel from misre... by mjevans on Thursday August 06, 2020 @05:22PM (#24075593)
I agree with and independently also use the parent's modification to ISO8601 with that respect; though I do frequently call the format string that contains whatever magic cookies get that output something similar to iso8601mod. (The modifications: Emit a string rather than a T, and (if included) use the email like +/-OFFSET to indicate the current timezone offset rather than specify a timezone. No offset implies UTC for system times and local time for human-facing times.)
Re:Scientists rename human genes to stop MS Excel from misre... by out_of_protocol on Thursday August 06, 2020 @06:48PM (#24076238)
Well it is but the T is ugly :/
Re:Scientists rename human genes to stop MS Excel from misre... by II2II on Thursday August 06, 2020 @07:25PM (#24076477)
I would argue that its use goes beyond sorting and includes people making mental estimates about time intervals. Having some sort of sensible order helps here, which I'm guessing is YMD for left to right languages and DMY for right to left languages, since that puts the most significant digits first.
Re:Scientists rename human genes to stop MS Excel from misre... by BrandoElFollito on Saturday August 08, 2020 @01:00PM (#24093143)
No, it does not take into account timezones.

We have ISO 8601, no need to reinvent the wheel as a square.

https://xkcd.com/1179/ (date only)

Re:Scientists rename human genes to stop MS Excel from misre... by dependenttypes on Tuesday August 11, 2020 @08:03AM (#24119429)
This XKCD is incorrect, 20130227 is also a valid ISO 8601 date.
Re:Scientists rename human genes to stop MS Excel from misre... by javier123454321 on Thursday August 06, 2020 @12:25PM (#24072477)
agreed fully
Re:Scientists rename human genes to stop MS Excel from misre... by spuz on Thursday August 06, 2020 @10:45AM (#24071359)
How is "06.08.2020" unambiguous?
Re:Scientists rename human genes to stop MS Excel from misre... by tremon on Thursday August 06, 2020 @10:56AM (#24071463)
There are no conventions that write a date as mm.dd.yyyy, so if you encounter a date in that format, it is safe to assume dd.mm.yyyy.

Contrast this with the slash or dash notation, where both mm/dd/yyyy and dd/mm/yyyy are prevalent in the world. But 2020-08-06 is unambiguous in the same way that 06.08.2020 is: the only convention in common use is yyyy-mm-dd.

Re:Scientists rename human genes to stop MS Excel from misre... by dragonwriter on Thursday August 06, 2020 @11:51AM (#24072071)
> There are no conventions that write a date as mm.dd.yyyy

While slash is the most common, use of hyphens and dots as separators for US-style dates is not at all unheard of in the wild for manually formatted dates. The fact that it doesn't show up in lists of national “preferred formats” and doesn't tend to be commonly implemented as a prebaked format in software doesn't mean it's not a real thing people see and will interpret dates they see in light of.

Re:Scientists rename human genes to stop MS Excel from misre... by stjohnswarts on Thursday August 06, 2020 @04:32PM (#24075157)
How is that safe to assume??? You can't assume anything, why not ask the source of the data? The other way is to attempt to confirm which order by looking for first 2 digits > 12, but that info might not be available depending on the data.
Re:Scientists rename human genes to stop MS Excel from misre... by fnbr on Thursday August 06, 2020 @11:21AM (#24071720)
Unfortunately, this isn’t true in Canada. MDY is very common, especially in the English parts. See:

https://en.m.wikipedia.org/wiki/Date_format_by_country

Re:Scientists rename human genes to stop MS Excel from misre... by FabHK on Thursday August 06, 2020 @11:47AM (#24072007)
MDY separated by dots? The link you gave does not seem to support that.
Re:Scientists rename human genes to stop MS Excel from misre... by arrrg on Friday August 07, 2020 @02:41AM (#24079025)
Separating dates with dots (DD.MM.YYYY) is what’s taught in school in Germany.

So, yeah, there is a convention to write dates exactly that way.

Re:Scientists rename human genes to stop MS Excel from misre... by lemmonii on Friday August 07, 2020 @03:02AM (#24079144)
Read the comment again...
Re:Scientists rename human genes to stop MS Excel from misre... by brummm on Thursday August 06, 2020 @01:52PM (#24073545)
It's unambiguous for everybody except Americans with their weird switching.
Re:Scientists rename human genes to stop MS Excel from misre... by owl57 on Thursday August 06, 2020 @10:55AM (#24071455)
Does anyone use mm.dd.yyyy?
Re:Scientists rename human genes to stop MS Excel from misre... by brummm on Thursday August 06, 2020 @01:52PM (#24073535)
Germany does. Probably the majority of Europe too
Re:Scientists rename human genes to stop MS Excel from misre... by eitland on Thursday August 06, 2020 @02:41PM (#24074088)
I think you misread: most of mainland Europe including Germany use dd.mm.yyyy or something else that is reasonable sane even if it isn't sortable like yyyy-mm-dd. Or am I wrong on this? Norway at least use mm.dd.yyyy and never mm/dd or mm.dd.yyyy
Re:Scientists rename human genes to stop MS Excel from misre... by pintxo on Thursday August 06, 2020 @04:07PM (#24074905)
Afaik Norway also uses the sane format: DD.MM.YYYY

See parent source: https://en.wikipedia.org/wiki/Date_format_by_country

Re:Scientists rename human genes to stop MS Excel from misre... by eitland on Thursday August 06, 2020 @05:08PM (#24075480)
Edit: of course. To late to edit but if you read my post, but that was what I meant.
Re:Scientists rename human genes to stop MS Excel from misre... by lioeters on Thursday August 06, 2020 @03:46PM (#24074701)
> The format dd.mm.yyyy using dots is the traditional German date format.

> Since 1996-05-01, the international format yyyy-mm-dd has become the official standard date format

https://en.wikipedia.org/wiki/Date_format_by_country

Re:Scientists rename human genes to stop MS Excel from misre... by arrrg on Friday August 07, 2020 @02:43AM (#24079041)
Schools still teach DD.MM.YYYY. That’s what’s relevant because that’s what people actually widely use.

Shouldn’t Americans be very familiar with the idea that official norms (the metric system) play no role if the people don’t want to use them?

Re:Scientists rename human genes to stop MS Excel from misre... by lioeters on Friday August 07, 2020 @11:14AM (#24082739)
I understand - it seems I was too optimistic to read that the use of yyyy-mm-dd has become "the official standard" in Germany, without considering the popular usage and convention under discussion.
Re:Scientists rename human genes to stop MS Excel from misre... by IgniteTheSun on Friday August 07, 2020 @03:55PM (#24085848)
I wish more people complied with ISO 8601.

    https://en.wikipedia.org/wiki/ISO_8601
Even better, wish everyone would standardize on:

* YYYYMMDD for dates

* YYYY-MM for months

* YYYYMMDDTHHMM for time where T is the capital letter T. Two additional digits can be added for seconds and then as many additional digits as needed for precision.

------------------

[Edited for format]

Re:Scientists rename human genes to stop MS Excel from misre... by sixdimensional on Thursday August 06, 2020 @10:43AM (#24071341)
ISO8601
Re:Scientists rename human genes to stop MS Excel from misre... by DocG on Friday August 07, 2020 @07:17AM (#24080670)
Because it's meant for human consumption. Day and month is usually relevant, while year is less so, so let's put it last.
Re:Scientists rename human genes to stop MS Excel from misre... by LatteLazy on Thursday August 06, 2020 @12:09PM (#24072281)
>2020-08-06 I've just switched to 20200806. Let it be an int and be done with it.
Re:Scientists rename human genes to stop MS Excel from misre... by gmfawcett on Thursday August 06, 2020 @05:44PM (#24075801)
A beautiful property of using ints to represent dates is that you can manipulate them using simple arithmetic. For example, if you want to refer to noon-time on 20200806, you can simply divide the day in two and write it as 10100403. An elegant, DRY solution to a perennial problem.
Re:Scientists rename human genes to stop MS Excel from misre... by trianglem on Thursday August 06, 2020 @06:51PM (#24076258)
I don’t get this? What does 10100403 mean?
Re:Scientists rename human genes to stop MS Excel from misre... by gmfawcett on Thursday August 06, 2020 @07:04PM (#24076343)
The poster is gently teasing the idea that integers like 20200806 are a reasonable way to to represent dates. Dividing 20200806 by 2, we get 10100403, representing the half-way point of the day (noon-time). Of course it's nonsense.
Re:Scientists rename human genes to stop MS Excel from misre... by trianglem on Friday August 07, 2020 @09:08PM (#24088073)
I’ve been had
Re:Scientists rename human genes to stop MS Excel from misre... by JackFr on Thursday August 06, 2020 @05:57PM (#24075906)
It’s beautiful. Just mod 7 to find the day of the week.
Re:Scientists rename human genes to stop MS Excel from misre... by gmfawcett on Thursday August 06, 2020 @06:05PM (#24075956)
Excellent example. Honestly, I have no idea why the concept hasn't caught on yet.

(I'd love to discuss this further... I'll be back on HN later tonight, sometime around 16834005.)

Re:Scientists rename human genes to stop MS Excel from misre... by owl57 on Thursday August 06, 2020 @12:28PM (#24072508)
Human readability sometimes matters.
Re:Scientists rename human genes to stop MS Excel from misre... by thaumasiotes on Thursday August 06, 2020 @04:48PM (#24075308)
The integer 20200806 is chosen solely for the purpose of human readability. If you actually wanted to store a date as an integer, you'd use the Julian day.
Re:Scientists rename human genes to stop MS Excel from misre... by stjohnswarts on Thursday August 06, 2020 @04:34PM (#24075174)
what human can't parse that? Sure it might take a half a second longer but it's hardly confusing.
Re:Scientists rename human genes to stop MS Excel from misre... by gmfawcett on Thursday August 06, 2020 @05:32PM (#24075684)
For those of us whose professional lives sometimes require staring at directory listings full of filenames like "output-200003021342"... for the love of God, please just put the dashes in.

I have an infinite number of dashes, I'll send you a lifetime supply!

Re:Scientists rename human genes to stop MS Excel from misre... by apricot on Thursday August 06, 2020 @09:44PM (#24077190)
greatideainthesameveinivedecidedtoforgospacesandpunctuationaswellbecauseitsavesspaceaswellaswearandtearonthekeyboard