[pmwiki-users] Fwd: date math

Tegan Dowling tmdowling at gmail.com
Thu Oct 25 08:41:53 CDT 2007


Aaargh, I meant to post to the group -- Sorry, PM!

---------- Forwarded message ----------
From: Tegan Dowling <tmdowling at gmail.com>
Date: Oct 25, 2007 8:40 AM
Subject: Re: [pmwiki-users] date math
To: "Patrick R. Michaud" <pmichaud at pobox.com>

On 10/24/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>
> On Wed, Oct 24, 2007 at 06:44:21PM -0700, TSgt Marshall Kelly wrote:
> > Hello all,
> >
> > Hope you don't mind another question.
> >
> > I've gotten "(:if date yyyymmdd..:) execThisCode (:ifend:)" to work, and
> I
> > can use the "math" function.
> >
> > But how can I use the current value of date in a math equation. I'd like
> > to determine if it's been X days since some event.
>
> Doing math on dates and times can be a bit tricky.
>
> You might be able to do something like
>
>     (:if date ..-3days :)
>
> to see if something occurred more than 3 days ago.


Could we maybe get some examples on the wiki of how to do this kind of
thing?  I'm sure I could use it, but without any examples it's just hard to
get a handle on.  I did add some stuff to the
http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions-Sandbox (I mention
since MarkupExpressions are part of this picture).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20071025/f1857396/attachment.html 


More information about the pmwiki-users mailing list