20 comments

[ 2.6 ms ] story [ 101 ms ] thread
So today is an international prime day because 291113 112913 20131129 are all primes

Today could also have been a "perfect prime day" if MM, DD, YY and YYYY had been prime (in addition to the above). But it's not the case...

11 -> is prime

29 -> is prime

13 -> is prime

2013 -> not prime (3 x 11 x 61)

Too bad! We will have to wait another 16 years before we have a perfect prime day...

ya, but each of the factors of 2013 is prime, so that's gotta mean something, right?
Isn't always possible to deconstruct the factors of a number in only primes?
I think ruttiger may mean that 2013 is the product of three unique primes (e.g. 30=2 * 3 * 5 would be another example, but 50=5^2 * 2 is not).
(comment deleted)
(comment deleted)
Not prime here in the UK where we write our dates DDMMYYYY.
In order of increasing duration, so you get to the most important information first. The correct order.
I like ISO format because then alphabetical order corresponds to chronological order.

Y-M-D and D-M-Y both have their advantages. Unfortunately my compatriots have standardized on M-D-Y, a convention that has no advantages that I can think of.

For some reason, I'm now thinking about programming for a 'middle-endian' CPU. Maybe it was a compromise between big and small.
While not really useful in any computer sense, M-D-Y matches common English spoken construction "January 4th, 2015" is 1-4-15
You mean common American English. The rest of the world is using 4th January, 2015.
I've always found M-D-Y apt for many use-cases, because I often know exactly which year is being referred to - I just need to know the month and day. With M-D-Y, that information is immediately presented. It seems like a decent compromise.
My favorite format is YYYY-MMM-DD. That is, year, 3-letter (english) month, day (i.e. 2013-Nov-29). Only works for people that know the english names for dates, but eliminates ambiguity about which is the day and which is the month.
> so you get to the most important information first.

Very debatable. I've always found YYYYMMDD to be the most pertinent format as it gives you the "most important information first". As in, DD is unusable if you don't know the month, and the month is unusable if you don't know the year.

I like to picture a world where everyone use YYYYMMDD, the Metric system and English for technical terms (I'm from France and I hate when we invent new terms for technical terms).

Most humans know what month and year they're dealing with already, and look to a date display to inform them of DD vastly more often than they look for MM, more often than they look for YYYY.

When dealing with data processing, the concerns are obviously different. But then it barely matters which order you use anyway.

I usually just use HL7 datetimes YYYYMMDDHHMMSSFFFF since it's mostly iso compatible and more importantly allows for varying levels of unknown values.

You may know what month something happened to you but you may not know the day in which case you would just write 201308 which is a perfectly valid date. You may know what day and what hour someone was born but you may not know the minutes or seconds (ex. 2013080506).

By using it, there is no ambiguity because the year signals the order of values. It also sorts better than any of the other methods.

You have to ask yourself in what cases do you have to write a date, or do you have to read a date.

For most "real life" cases I could find it was smarter to put YYYY first. And for an impressive number of cases, the day of the month didn't really matter and could then be omitted more easily.

You don't, though.

You get the 2nd shortest duration first (tens of days) then the shortest (days) then the fourth shortest (tens of months) then the third shortest (months) etc

With the ISO standard every character symbolises a larger duration than the one that follows, so to get a strictly increasing order you have to reverse the string entirely - today would be 92-11-3102

(comment deleted)