Jump to content
dfay

Date Snippets - insert upcoming days (next Monday etc.)

Recommended Posts

Dynamic snippets to insert the date corresponding to the upcoming day.

 

d.nm - next Monday

d.nt - next Tuesday

d.nw - next Wednesday

d.nr - next Thursday

d.nf - next Friday

d.ns - next Saturday

 

So given today's date 2018-07-30, the snippets in sequence produce

2018-08-06

2018-07-31

2018-08-01

2018-08-02

2018-08-03

2018-08-04

 

d.m+ - first day of next month

2020-02-01

 

And dt.n to add the next business day in prose, e.g. Tuesday, June 4, 2019

 

Download

 

v. 1.2 

- added first day of next month

- added external triggers for M of next week and 1st of next month

- updated so snippets will paste in Alfred (using the trick here: https://www.alfredforum.com/topic/11765-snippet-triggers-triggered-in-alfred-dont-paste-to-alfred/?tab=comments#comment-61652 )

 

Edited by dfay

Share this post


Link to post

Updated to use Alfred 4 conditionals to add a snippet to produce the next business day in prose (almost as requested here): 

 

Share this post


Link to post

Can you provide an example of how to use this in a snippet? I've tried every possible permutation I can think of with no success.

 

Thanks!

Share this post


Link to post

It's a workflow, with snippet triggers, so you'd need the PowerPack & to install the .alfredworkflow file linked in the first post.

Share this post


Link to post

Thanks. Yes, I have the powerpack and workflow installed.

 

One thing I noticed just now is that the snippets in the workflow didn't import with the keywords set. Once I added a keyword I was able to get the snippet to work, e.g. here => 2020-04-27. Are the keywords not supposed to be imported along with the workflow, or is there a problem somewhere?

 

That aside, what I'm really trying to do is use these snippet triggers within another snippet. OnceI realized this was probably the problem, I found your comment to a thread on nested snippets, which I read as saying I'll need to customize the workflow in order to get this to work. Is that still the case, as far as you know?

 

 

Share this post


Link to post
2 hours ago, sbc said:

Are the keywords not supposed to be imported along with the workflow, or is there a problem somewhere?

 

Alfred strips hotkeys and snippet triggers on import  to prevent surprises. You have to set your own, but once you do, Alfred will remember them and keep your changes when you update a workflow.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...