Showing posts with label Geek Time. Show all posts
Showing posts with label Geek Time. Show all posts

Sunday, February 2, 2020

Even More Date Masking..... Sorta

Today is is the 2nd day of February in the year 2020. And just like any palindrome, this means that it's written the same both forwards and backwards.

Today is a Palindrome Day!

Palindrome Days are pretty rare, except for the first few centuries of a new Millennium, which is where we currently find ourselves. I was here for the start of this Millennium, but (...since I don't want to make my vampire traits overly obvious and draw the attention of Buffy & Friends...), I doubt I'll be here for the start of the next one.

What makes this one pretty cool, is that it doesn't matter which of the two main maskings you use, mmddyyyy or ddmmyyyy, today will be the same. It's also pretty much the only day within my lifetime that the non-ISO date formatting simply doesn't matter.

Since I'm in the U.S., and we want to be different from pretty much everyone else, I commonly see my standard American mmddyyyy masking. That makes today 02022020. Or if you reverse it, it becomes 02022020.

But say I was looking at today from somewhere that is pretty much the rest of the world. Today is ddmmyyyy: 02022020. It still gets to be a palindrome!

It's also the 33rd day of the year AND there are 333 days left in the year.

Courtesy of https://www.pinterest.com/pin/523684262891075625/
Geek Overload = 11!
Since my brain has already exploded, this morning, at 02:02:20 UTC (or your local timezone if you're cheating), we can kick that palindrome out to a time component.

What if we go with ISO-8601 standard formatting: yyyymmdd. That's 20200202. The digits shift by a character, but we're still a palindrome. We have hit a palindrome date in 3 different formats!

This also makes today a Global Palindrome Day!

Our last one was November 11, 1111. I wasn't there for that one either. And our next one won't occur until 12/12/2121. Oddly enough, my son's birthday is December 12. But that date is slightly above the Guinness Record for Oldest Person. Who knows. At that point, he'd be over 120 years old. It would be pretty cool to cement a fairly interesting and likely unique Guinness Record.

But, once again, I offer you a very geeky Happy Global Palindrome Day!

Wednesday, January 8, 2020

IRL ISO 8601!

This morning I went to the doctor and experienced my first real-life ISO 8601 Internationalization issue.

The Check-in Nurse asked me to verify my birthday. I told her "7/1/xxxx" instead of "July 1, xxxx", and she told me she hoped I had a Happy Birthday yesterday.

I appreciated the sentiment but was knocked off kilter for a second. My birthday happened several months ago! Then I quickly realized that 1) She is from somewhere other than the US and 2) THIS was the exact reason why I have been a long-time proponent of using ISO 8601 data standards for database and application dates. (Those were my actual thoughts, and yes, they were very geeky.)

For those not familiar, ISO 8601 essentially describes a standard way to display dates so that you remove any confusion in common international representations.

For instance, in the US, a date of "7/1" is interpreted as "the 1st day of July". But in most of the rest of the world, "7/1"means "the 7th day of January".

Countries by Date Format

It's not difficult to see how this can cause quite a few problems because we in the US have gone our own way on this.

She apologized for her "mistake", but all I could think was that it was actually my national culture that was on the divergent side.

Anyway, it was a great personal reminder of the necessity for a standard.


TL;DR: If you want to avoid confusion when you store or display dates, please use some form of yyyy/dd/mm ... (though I guess even those lower-cased masks can lead to incorrect display of a date in different coding languages).

PS: I HATE DATES!