[Remind-Fans] Can Remind Schedule On the Tuesday and Friday of a "Payday Week"?

David F. Skoll dfs at roaringpenguin.com
Tue Aug 26 15:15:24 EDT 2008


Mike Harris wrote:

> I'm paid on the 15th and the last day of the month, or the first
> weekday preceding same if that falls on a weekend. [...]

> Each week that contains a payday, that Tuesday, I prepare a grocery
> order on Peapod.

> Each week that contains a payday, that Friday, I actually put the
> order in for a Saturday delivery.

> The problem is that these Tuesdays and Fridays can either fall before,
> after, or on the payday in question.

OK... this was a real challenge.  Here is my solution.  I will not post
an explanation for a while; see if you all can figure it out. :-)  If anyone
can come up with something more elegant, I'd love to see it.

Regards,

David.


# ==== Grocery Order / Payday Solution ====

FSET _back(x) trigger(today()-x)
FSET _goodtue(x) (trigdate() - x >= -3 && trigdate() - x <= 1)
FSET _goodfri(x) (trigdate() - x >= 0 && trigdate() - x <= 4)

REM 1 -1 SCANFROM [_back(7)] OMIT Sat Sun MSG Payday
set pd1 trigdate()
REM 16 -1 SCANFROM [_back(7)] OMIT Sat Sun MSG Payday
set pd2 trigdate()

REM Tue SATISFY [_goodtue(pd1) || _goodtue(pd2)] MSG Prepare Order

REM Fri SATISFY [_goodfri(pd1) || _goodfri(pd2)] MSG Submit Order




More information about the Remind-fans mailing list