Tomorrow's Date from a Template Tag

I use Drafts to write my lesson plans, no surprise, but I love it! I made a video about how I use it here:

Not one to leave well enough alone, I am hoping to use a template tag to pre-load an answer to one of the prompts. I want to use the date tag, but I want it to give me the date for tomorrow (example in the screenshot)

I got the tag formatting from this reference, but I don’t see an option to get tomorrow’s date.

Any advice?

The template tags in and of themselves do not support date math, it requires scripting. If you put the following in a script step at the beginning your your action, it will define a new [[tomorrow]] template tag you can use to insert that date in later steps:

// get tomorrow's date
let tomorrow =;
// convert it to a formatted date string
let s = strftime(tomorrow, "%m-%d-%Y");
// create the template tag
draft.setTemplateTag("tomorrow", s);
// now use [[tomorrow]] in your prompt step

7 minutes! It only took you 7 minutes to reply with custom code to solve my problem, you sir are amazing!

Thank you for not only making this app, but also being so active and supportive in the forums!

Well, don’t expect that kind of response every time, just caught me over morning coffee. :slight_smile:


No expectation changes, just gratitude and awe! Thanks again!

Can you share the actions?

Sure, this is my first post to the action directory:

I hope it helps you!

1 Like

Just thought I would say great video.

1 Like

I’m going to look stupid :slight_smile: but this example made why one might create template tags in javascript gel in my mind.

Thank you for your kind words!

I am glad it helped provide that context for you!

Far from looking stupid, but If it helps, I didn’t even know you could define your own tags. So you are one up on me!

1 Like