October 18, 2017 at 1:23 PM by Dr. Drang
Recently, I decided my collection of date and time snippets in TextExpander was a mess: too many snippets and abbreviations that were too hard to remember. So I cleaned it up into what I hope will be a more useable system.
The complexity of my date and time snippet collection comes from the many formats I use. In reports I send to clients, I use dates in the formal long American style: October 18, 2017. In emails, I often use the short, slashed style: 10/18/17.1 In naming files, I use styles that alphabetize in chronological order: 2017-10-18 or 20171018.
What I really wanted was just one snippet that generated a popup menu from which I could choose the appropriate date style. Unfortunately, while TextExpander has a feature for including popups in a snippet, I couldn’t get it to accept other snippets as the options.
Every time I tried to add a percentage sign to an option (% is TextExpander’s marker character for snippets), TextExpander balked and changed the % to a /. I even typed out the popup code by hand in BBEdit and tried to paste it into TextExpander, but all that did was cause TextExpander to crash. So although TextExpander does allow nested snippets, it apparently doesn’t allow them in popups. Back to the drawing board.2
What I came up with was set of abbreviations based on ds for “date stamp” and ts for “time stamp.” Here they are:
- ds: October 18, 2017
- dds: 10/18/17
- ddds: 2017-10-18
- dddds: 20171018
- ts: 1:05 PM
- tts: 13:05:22
There also a mixed one. The abbreviation “dts” gives a combined date and time stamp that alphabetizes in chronological order: 2017-10-18 13:05:22.
The Date and Time snippet group has a d prefix, so to get, for example, “2017-10-18 13:05:22” I type ddts.
The advantage of using repeated characters to distinguish the snippets is that it cuts down on the thinking I need to do. If I want a date stamp, I know the abbreviation is some number of ds followed by an s. I can’t fully justify my choices for how many ds are in each abbreviation; it just seemed right to me based on how often I use each date style.
A good argument could be made that this is stupid. Why use an abbreviation tool like TextExpander to create what is, in essence, another abbreviation? But there are social conventions to be met. If I’m writing a reply to an email thread in which everyone else is talking about “10/19/17,” I’m going to look silly talking about “October 19, 2017.” ↩
I could make a single popup in Keyboard Maestro that would work on the Mac, but I wanted a system that also worked on iOS. ↩