Jump to content

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


Recommended Posts

Posted (edited)

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 )

 

v. 1.3 2022-03-31

- updated to use Python 3 for compatibility with MacOS 12.3

Edited by dfay
  • 10 months later...
Posted

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

 

  • 2 months later...
Posted

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!

Posted

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

Posted

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?

 

 

Posted
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.

  • 8 months later...
Posted

@dfay can you please explain what to change in the workflow in order to get it working? Perhaps share some screenshots :) 

Every snippit in the workflow starts with :week.

 

 

 

  • 4 months later...
Posted

Hey @dfay I am just finding this workflow now - thank you! It's working great so far.

 

I wanted to ask if there was any reason you didn't include a snippet for Sunday (i.e. next Sunday)?

 

Quote

d.nm - next Monday

d.nt - next Tuesday

d.nw - next Wednesday

d.nr - next Thursday

d.nf - next Friday

d.ns - next Saturday

 

I personally work on Sundays and would love this to be included as well. Can you guide me through how to add that, or perhaps include that in an update if it's not too difficult?

 

I'm also curious if it is possible to duplicate them to include something like ;sunday in two weeks; or ;monday in two weeks; - that would be super handy. 

 

I'm curious if you have a guide or steps published somewhere to edit this workflow in any way? 

 

I've been looking for a way to enter dates dynamically like this for a while - thanks again! 

  • dfay changed the title to Date Snippets - insert upcoming days (next Monday etc.) - updated for 12.3
  • 7 months later...
  • 1 month later...
Posted

sorry for the very late reply. it's still not working for me.

 

[07:54:16.029] Date snippets[Snippet] Processing complete
[07:54:16.034] Date snippets[Snippet] Passing output '' to Arg and Vars
[07:54:16.035] Date snippets[Arg and Vars] Processing complete
[07:54:16.036] Date snippets[Arg and Vars] Passing output '0' to Run Script
[07:54:16.049] ERROR: Date snippets[Run Script] xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
[07:54:16.051] Date snippets[Run Script] Processing complete
[07:54:16.051] Date snippets[Run Script] Passing output '' to Copy to Clipboard
[07:54:16.052] Date snippets[Copy to Clipboard] Processing complete
[07:54:16.053] Date snippets[Copy to Clipboard] Passing output '' to Dispatch Key Combo

  • 7 months later...
Posted

This workflow is just what I've been looking for, thanks. 

 

Is there a way to modify the date format of the output? At the moment it's in this format: 2023-08-15 

With other Alfred snippets I can specify e.g. {date:dd.MM.yyyy}

 

Is there a way to specify the date output format for this workflow? Thanks in advance 🙏🏻

Posted
On 8/9/2023 at 12:33 AM, Richard Wayman said:

This workflow is just what I've been looking for, thanks. 

 

Is there a way to modify the date format of the output? At the moment it's in this format: 2023-08-15 

With other Alfred snippets I can specify e.g. {date:dd.MM.yyyy}

 

Is there a way to specify the date output format for this workflow? Thanks in advance 🙏🏻

 

I would love to know this as well!

  • 10 months later...
Posted

The dropbox link here is dead and I can't seem to find this anywhere. Do you still have and use this? I had this on my last work computer and used it constantly, I lost it at some point in the transition to a new job and I'd love to get it back again.

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
×
×
  • Create New...