Is it possible to insert a future date based on the week day

I use Workflowy and often create tags based on TextBlaze snippets. Is there a way that I could use a snippet to say insert next Thursday's date. I know I can use the +1 feature to move to tomorrow, but is there a way to pick a specific future day?

Thanks

Yes, you can do this. Here is an example that will insert next Thursday's date:

{time: LL; shift= >THU}

The docs give more examples and describe the ">THU" expression some more.

Thanks Scott,

I've been testing that but I've just noticed that if I want to use that method to enter next Wednesday, and today is Wednesday, then it'll put in today instead of next Wednesday. Is there a way around that, do you know?
Many thanks,

Shane

You could increment the day by one, and then do the shift. So the next Wednesday that is not today would be:

{time: LL; shift= +1D >WED}

Ah brilliant, I didn't realise you could do that. Thanks again Scott.

You can string together the different types of shifts to implement fairly complex behavior. E.g. you could get the first Monday of the next year with +1D >Y >MON.

That's amazing. I didn't realise the functionality would stretch to that. I assumed it was one thing or the other I'm getting more and more impressed with textblaxe

@Shane_Keenaghan

You can take is a step further if you want.

{note}Next {formmenu: name=day; MON; TUE; WED; THU; FRI; SAT; SUN} << This line won't show up in your snippet output.
{endnote}
{time: dddd, LL; shift= +1D >{=DAY}}

Note that the "Next" + drop-down menu are inside a note command, so they won't show up in your snippet output.

How about business days? I want a snippet that includes a day which defaults to the next business day. I'm imagining a syntax like this: {time: dddd, LL; shift= +1Db} which would generally return the next day but, on a Friday, would return Monday.

I'm not seeing anything like that in the docs, but maybe I'm missing something?

@zahid1 Business Days are an very tricky concept as things like holidays will be different if each locale. We're not really sure how we want to address it at this point.

That makes sense. Maybe you could implement a simplified version of the concept by using "weekdays" rather than "business days" -- so in the US it would always roll from Friday to Monday regardless of holidays. It's possible that other locales have different business weeks but there's probably not as much localization needed with this approach.

The way I feel this needs to be solved is to add an invalid business days option to the time command which lists days that are not valid business days.

So you would have something like (using "B" to signify a business day shift):

{time: LLL; shift=+5B; notbusiness=SAT, SUN, 12-25}

Which would skip over Saturday, Sundays and December 25th (regardless of whether it was a Saturday or Sunday).

This would allow the user full control over what is business day and what wasn't. My concern though is how clunky this syntax is. It makes the snippet significantly more complex and also is a difficult to configure for the user.

My other concern are holidays like easter that don't fall on a fixed day each year which would require the user to continually update their list periodically.

You're right, this is hairy, and my use case may not be the best test case since it's pretty forgiving (my usage volume would be low enough that i can just correct any inaccuracies).

If you do go the route you're thinking about, you may want to genericize the syntax to:
`{time: LLL; shift=+5; skippast=SAT, SUN, 12-25}

Thanks for the responses.

Hi,
I would like to contribute to this as well.
I have recently started using this and I quickly discovered that in my cases I am missing the workday functionality.

Instead of making this a complex feature with a lot of possible options, then make a simple version first.
The most simple version as I see it would be to:

{time: LLL; shift=+2B; notbusiness=SAT, SUN}

with the only options being:

  • MON
  • TUE
  • WED
  • THU
  • FRI
  • SAT
  • SUN

Then on a Friday, it would give Tuesday and I have to take my national holidays into account when I respond with a snippet. When I use it I find out what I actually want.
It is impossible for me to describe exactly what I want because my own knowledge and needs might change when I have the functionality or that I find out that it was not that I wanted to begin with and I need something else instead.

This would only give me a little bit of extra work around holidays, but since most people in the world collaborate or communicate with people from other countries, it is already a habit to do so.
I have this small reminder for my self that I need to set auto-reply when I am out and I have to take holidays into account.

You can always add functionality and options later, but by making a simple function and then asking for feedback on this specific topic you will get a lot of valuable feedback to improve and work with. There might come an idea you would never have thought of but it is the right solution.

Best regards
Charles

Thanks for the feedback Charles.

What do other people in this thread think of his suggestion? Would it be sufficient for your use cases?

This would work for my purpose, thanks. I would still recommend "skippast" rather than making this explicitly about business days, as that would support substantially more use cases, but Charles' idea works.

What do you think of this syntax? So rather than adding a new setting, the syntax of the shift command is extended:

Skip the weekend:

{time: LLL; shift=+2D-SAT/SUN}

Skip the weekend and Monday:

{time: LLL; shift=+2D-MON/SAT/SUN}
1 Like

I'm new here but this would save me time and effort and I like this solution!

Scott - that approach works well. And it's extensible so if you want to start with just days of the week, and later add support for specific dates or something more complex, you can do that. Thanks!

We've iterated on this idea further to make the syntax more readable.

You can now test it out below. Please give it a try below and let us know what you think.

Note if it doesn't work below, try reloading this page to make sure you have the most recent version of forum code.

The following is an experimental feature that is shown for feedback. It is not currently implemented and may change before implementation.

No skips:
{time: LL; shift=7D}

Skip the weekend:
{time: LL; shift=7D(skip=SAT, SUN)}