A Timestamp Hydra

It’s astounding how many “standard” formats there are for date/time stamps. Two or three years ago, I gave up my American provincialism on the matter and settled on the formats

  • 2018-05-09,
  • 2018-05-09 Wed, and
  • 2018-05-09 Wed 13:24.

I like them because they are unambiguous—unkike, say 10/11/12—and easy to parse programmatically. They also seem more logical because they move from the more general to the more specific. What kind of logical sense does “May 9, 2018” make?

Still, other folks prefer different formats such as ISO-8601, which I’d use except it confuses the civilians with the T and offset. Whatever your preferences, Grant Rettke has you covered with a hydra to generate timestamps in multiple formats. You may think it’s silly to have so many formats available but sometimes you’re dealing with entities that insist on a certain format and Rettke’s hydra let’s you use whatever’s appropriate. If your favorite format isn’t included, it’s trivial to add another.

Rettke leverages hydras for his workflow a lot and this is another excellent example of how their use can make your workflow easier. Some folks don’t like them but unless you fall into that category, you’ll probably find that they can ease your workflow by grouping similar tasks into a simple menu-driven interface.

This entry was posted in General and tagged . Bookmark the permalink.