Palindrome Day

Today is not Palindrome Day. Or is it?

Palindrome Day is a day when the date is the same backwards as forwards.

For example, take the date “October 11th, 2001”, and write it out like “10/11/01”.

Date formats

Americans like to write out dates in the order they pronounce them, like “January 31st, 1999” becomes “01/31/99”.

In Sweden (and I think most of Europe), we do the same thing, only we pronounce dates differently.

To take the example above, we would say “the 31st of January, 1999”, and write it out as “31/01/99”.

Furthermore, when we write out a person’s birthdate, we write it as “YEAR-MONTH-DAY”, a third format.

Here’s where the problems arise. There are a million and one ways to format dates, and since the order of the dates matter a lot when looking for palindromes, Palindrome Day differs a lot depending on where you live.

The fun part with this is that almost ANY day can be Palindrome Day, with just the right formatting applied.

Let’s try with today’s date: “February 20th, 2015”. We can see that the year “2015” (or just “15”) will be a tough one to reverse (there aren’t many days or months that equal “51”).

For example:

“02/20/15” => “51/02/20” No good.

“15/02/20” => “02/20/51” No good.

So what can we do? Let’s try and throw some times into the mix!

“15/02/20 02:20:51” => “15:02:20 02/20/51” Much better!

As you can see, even today can be a Palindrome Day!

Try it for yourself and see if you can turn your dates into palindromes.

Posted: February 20th, 2015
Categories: Thoughts
Comments: Comments.