[Remind-Fans] sat->fri and sun->mon
Tim Chase
remind at tim.thechases.com
Thu Feb 3 21:34:29 EST 2022
On 2022-02-03 20:28, Dianne Skoll via Remind-fans wrote:
> But if you want a more concise, but less efficient and less readable
> version of your Veteran's Day example...
>
> REM Nov SCANFROM -7 SATISFY [($Td == 10 && $Tw == 5) || \
> ($Td == 12 && $Tw == 1) || \
> ($Td == 11 && $Tw >= 1 && $Tw <= 5)] MSG Veteran's Day
>
> OMIT [$T]
>
> Decoding the expression, it accepts: The 10th if it's a Friday; the
> 12th if it's a Monday, or the 11th if it's a Monday through Friday.
Could even wrap it up neatly in a function like
FSET noweekend(dom) ($Td == dom-1 && $Tw == 5) || \
($Td == dom+1 && $Tw == 1) || \
($Td == dom && $Tw >= 1 && $Tw <= 5)
to use like
REM Nov SCANFROM -7 SATISFY [noweekend(11)] MSG Veteran's Day
OMIT [$t]
-tim
More information about the Remind-fans
mailing list