Daily Tasks + Weekends

I have a daily task that I need to do every morning, and also need to do on Monday morning for Saturday and Sunday. FWIW that task pulls information done the previous day.

Monday, I need to pull from Fri, Sat, & Sun.
Tues: Need to pull Mon.
Etc.

I've built it this way:

{note}{if: {time: dddd} == "Monday"}{daysback=3}{else}{daysback=1}{endif}

{endnote}{repeat: for entry in seq(1, daysback); locals=reps; trim=right}{note}{endnote}Generic entry for {time: DDMMM; shift=-{=entry}D}{key:enter}{wait: delay=+2s}generic keystrokes{key:enter}generic keystrokes too{key:enter}{wait: delay=+2s}{note}
{endnote}{endrepeat}

But now I'm trying to figure out how to solve for holidays. Is it possible to retrieve the date the snippet was last used? Then I could just solve for number of days between then and now and calculate it that way. Any other options?

I think this might be easiest from a workflow standpoint if you made the daysback customizable. So when you had a holiday you could just change it to the right value.

Something like this would work for that:

{note}Daysback: {formtext: name=daysback; default={= 3 if {time: dddd} == "Monday" else 1}}{endnote}

I was afraid you'd say that :slight_smile:

No worries, I'll make do.