Templater
Templater copied to clipboard
Offset for weekdays only?
Hi! Thanks so much for this awesome plugin. It makes my life easier every day.
Is it currently possible/could it be possible to offset without counting the weekend? I have a few templates that link to tomorrow's documents (such as daily note) and it would be super cool to have the option of having them link to Monday's documents on a Friday, for example.
Thanks!
If you link your templates, we could add some code to implement that function.
You can use the following snippets:
Previous workday: <% tp.date.now('YYYY-MM-DD', tp.date.now('d') == 1 ? -3 : -1) %>
Next workday: <% tp.date.now('YYYY-MM-DD', tp.date.now('d') == 5 ? 3 : 1) %>