[Remind-Fans] Remind-fans Digest, Vol 35, Issue 13

Jacob Shlafman jshlaf at gmail.com
Sun Jan 21 12:32:03 EST 2007


On 1/21/07, remind-fans-request at whatexit.org <
remind-fans-request at whatexit.org> wrote:
>
> Send Remind-fans mailing list submissions to
>         remind-fans at lists.whatexit.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.whatexit.org/mailman/listinfo/remind-fans
> or, via email, send a message with subject or body 'help' to
>         remind-fans-request at lists.whatexit.org
>
> You can reach the person managing the list at
>         remind-fans-owner at lists.whatexit.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Remind-fans digest..."
>
>
> Today's Topics:
>
>    1. Re: the first 3 consecutive working days of the month (Paul Pelzl)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 20 Jan 2007 12:35:03 -0500
> From: Paul Pelzl <pelzlpj at eecs.umich.edu>
> Subject: Re: [Remind-Fans] the first 3 consecutive working days of the
>         month
> To: Users of the <remind-fans at whatexit.org>
> Message-ID: <20070120173503.GG21505 at edinburgh.eecs.umich.edu>
> Content-Type: text/plain; charset=us-ascii
>
> On Sat, Jan 20, 2007 at 01:43:50PM +0000, T E Schmitz wrote:
> > I have puzzled over this for a few days but unfortunately can't get this
> > to work myself:
> >
> > I am looking for a sequence of the first 3 consecutive non-omitted days
> > at the beginning of every month where:
> > - day3 >= 1st
> > - day1 = day3 - 2
> > - day1 is the trigger date
>
> Yeah, this is tricky.  I think this does about the right thing:
>
> FSET _prev_month(d_date) date(year(d_date), (monnum(d_date)+10)%12 + 1,
> day(d_date))
>
> REM 1 SATISFY 1
> REM SCANFROM [trigger((trigdate()))] SATISFY !isomitted(trigdate()-2) &&
> !isomitted(trigdate()-1) && !isomitted(trigdate())
> REM [trigger(trigdate()-2)] MSG beginning of three consecutive non-omitted
> days
>
> REM 1 SATISFY 1
> REM SCANFROM [trigger(_prev_month(trigdate()))] SATISFY
> !isomitted(trigdate()-2) && !isomitted(trigdate()-1) &&
> !isomitted(trigdate())
> REM [trigger(trigdate()-2)] MSG beginning of three consecutive non-omitted
> days
>
>
>
> My strategy here is:
>    1) Find the first day of next month
>    2) Scan forward from this date for the first day which satisfies the
>       "3 consecutive non-omitted days" logic (this will find the end of
>       the block of three days)
>    3) Schedule a reminder for the beginning of this block of three days
>    4) Do 1-3 again, starting from the first day of *this* month.
>
> I think it's hard to do this without two different reminders due to the
> "edge effects" at month boundaries.  If "today()" is Jan 30 2007, then
> "REM 1 SATISFY 1" triggers on Feb 1--exactly where we want to be
> scanning to figure out whether Jan 30 2007 is the start of a block of
> non-omitted days.  However, if "today()" is Feb 3 2007, then "REM 1
> SATISFY 1" triggers on Mar 1... and we probably want to be looking
> around Feb 1 instead.
>
> Paul
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Remind-fans mailing list
> Remind-fans at lists.whatexit.org
> http://lists.whatexit.org/mailman/listinfo/remind-fans
>
>
> End of Remind-fans Digest, Vol 35, Issue 13
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20070121/3cb74709/attachment.htm>


More information about the Remind-fans mailing list