5 Jan 2007 16:17

## Re: trigger date defined as: date+x days

```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

```
5 Jan 2007 17:08

### Re: trigger date defined as: date+x days

```Paul Pelzl wrote:
> 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.
>
> 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...

As far as the first example (add 180 days) is concerned, I don't think
so. My mobile PAYG phone has to be used once in 180 days or the credit
```