Live data from Hacker News

22-11-22 22:11:22

news.ycombinator.com

1–10 of 40 posts

Re: 22-11-22 22:11:22

#8

Earlier quoted context omitted.

...or last year, on Nov. 12th.

or 11-11-11 11:11:11 or 01-01-01 10:10:10 Interview question: write a program to list them all!

Sounds like a great Code Golf contest.

ruby -e 'require"date";a=DateTime.new(0,1,1,0,0,0);(0..4e9).each{|d|b=(a+Rational(d,86400));c=b.strftime("%y%m%d%H%M%S");puts b.strftime("%y-%m-%d %H:%M:%S")if c==c.reverse}'

About the most inefficient anyone could make it, but I think it works!

Post reply on HN