Jump to content

Custom date/time formats for snippets


Recommended Posts

I frequently use a specific date format that's not able to be achieved using the dynamic placeholders for snippets (without changing my system date formatting) :

https://www.alfredapp.com/help/features/clipboard/dynamic-placeholders/

 

Specifically, I prefer to have yymmdd as a snippet (it's a compliant file name without punctuation and sorts naturally).

 

When making sure I wasn't filing a duplicate, I came across a different but related request, just for the year:

http://www.alfredforum.com/topic/1021-snippet-year-placeholder/?hl=%2Bdate+%2Bsnippet

 

So my request is that of enabling more granular date formatting... perhaps breaking it into components such that I might be able to use:

{year:small}{month:small}{day:small}

 

Actual tag names aren't as important as the functionality, so something already known and documented would be more flexible, such as Python's strftime's spec:

https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior

 

ie:

{date:'%y%m%d'}

 

That would make me so happy.

 

 

Link to comment
Share on other sites

I frequently use a specific date format that's not able to be achieved using the dynamic placeholders for snippets (without changing my system date formatting) :

https://www.alfredapp.com/help/features/clipboard/dynamic-placeholders/

 

Specifically, I prefer to have yymmdd as a snippet (it's a compliant file name without punctuation and sorts naturally).

 

When making sure I wasn't filing a duplicate, I came across a different but related request, just for the year:

http://www.alfredforum.com/topic/1021-snippet-year-placeholder/?hl=%2Bdate+%2Bsnippet

 

So my request is that of enabling more granular date formatting... perhaps breaking it into components such that I might be able to use:

{year:small}{month:small}{day:small}

 

Actual tag names aren't as important as the functionality, so something already known and documented would be more flexible, such as Python's strftime's spec:

https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior

 

ie:

{date:'%y%m%d'}

 

That would make me so happy.

 

 

In Alfred 3, you'll be able to use various date formats, e.g. {date:dd/MM/yy}

 

We'll provide more details in the Alfred 3 documentation very soon! :)

 

Cheers,

Vero

Link to comment
Share on other sites

  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...