[Remind-Fans] trigger date defined as: date+x days

Paul Pelzl pelzlpj at eecs.umich.edu
Fri Jan 5 10:17:52 EST 2007


On Fri, Jan 05, 2007 at 12:08:34PM +0000, T E Schmitz wrote:
> Paul Pelzl wrote:
> > On Fri, Jan 05, 2007 at 12:05:59AM +0000, T E Schmitz wrote:
> >>My event is, say, 180 days after a certain date. So, I want date+180 as 
> >>my trigger date. How do I express this?
> > 
> > 
> > If you know the value of "date" ahead of time, then you can enter it as
> > a date constant which can be used in arithmetic expressions:
> > 
> >    REM [trigger('2007-01-04' + 180)] MSG 180 days after Jan 4
> 
> How would I add 3 months?

   FSET _add_months(d_date, m_int) date(year(d_date), monnum(d_date) + m_int, day(d_date))
   REM [trigger(_add_months('2007-01-04', 3))] MSG three months after Jan 4

This is untested, but probably works.  

I feel like I should point out that these are not very common Remind
idioms.  Usually it's possible to get the reminder you're looking for
without doing so much work, and I'm starting to wonder if you trying to
solve a problem the hard way...

Paul





More information about the Remind-fans mailing list