[pmwiki-users] Page text variable arithmetic

Tegan Dowling tmdowling at gmail.com
Wed Aug 29 16:00:21 CDT 2007


On 8/29/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Wed, Aug 29, 2007 at 04:07:01PM -0300, Guillermo Calderon - INCO wrote:
> > Steve Glover wrote:
> > > Hi,
> > >
> > > Is there a way, please, of carrying out either arithmetic or comparisons
> > > when creating a PTV?
> > >
> > > I have {(ftime fmt="%Y%m%d" when="{$Title}")} which gets the date string
> > > from my page name as yyyymmdd and {(ftime fmt="%Y%m%d" when="{$Today}")}
> > > which gets today's date in the same format, and I'd like to be able to
> > > create a variable that will indicate if page dates are past, present or
> > > future.
> > >
> >
> > Maybe you can achieve thiat with conditional markup:  (:if date .... :)
> > Take a look at
> >
> >        http://www.pmwiki.org/wiki/PmWiki/ConditionalMarkup
>
>
> Perhaps:
>
>     (:if date today        "{$Title}"  :)  title is today
>     (:if date tomorrow..   "{$Title}"  :)  title is after today
>     (:if date ..yesterday  "{$Title}"  :)  title is before today

Would there be some way to specify pages dated within the last week,
month or year (or within the last 7, 30 or 365 days), or in the
current week, month or year?

Or more than 1 week, month or year old?



More information about the pmwiki-users mailing list