Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Palindrome Day 20200202. Parent comment
Let us represent the 8 digits of such a date (in YYYY-MM-DD format) as abcd-ef-gh.
Since abcd-ef-gh (i.e., YYYY-MM-DD format) is a palindrome, we get a = h, b = g, c = f, and d = e.
Since ef-gh-abcd (i.e., MM-DD-YYYY format) is a palindrome, we get a = h, b = g, c = f, and d = e.
Since gh-ef-abcd (i.e., DD-MM-YYYY format) is a palindrome, we get a = f, b = e, c = h, and d = g.
Combining all of these, we get a = c = f = h and b = d = e = g.
Therefore, such a date must be of the format abab-ba-ba, i.e., it may have a maximum of only two distinct digits.
There are no comments on this comment yet.
Let us represent the 8 digits of such a date (in YYYY-MM-DD format) as abcd-ef-gh.
Since abcd-ef-gh (i.e., YYYY-MM-DD format) is a palindrome, we get a = h, b = g, c = f, and d = e.
Since ef-gh-abcd (i.e., MM-DD-YYYY format) is a palindrome, we get a = h, b = g, c = f, and d = e.
Since gh-ef-abcd (i.e., DD-MM-YYYY format) is a palindrome, we get a = f, b = e, c = h, and d = g.
Combining all of these, we get a = c = f = h and b = d = e = g.
Therefore, such a date must be of the format abab-ba-ba, i.e., it may have a maximum of only two distinct digits.