[pmwiki-users] Adding/subtracting days to ftime Page Text Variable

Petko Yotov 5ko at 5ko.fr
Fri Sep 5 08:16:49 CDT 2014

I modified the DRange() function to try to parse such dates with +/- number  
of days/weeks/months etc. The core {(ftime when="2014-09-05 +25days")}  
should work in the next version (due in 25 days :-).

If you want to test the pre-release ZIP archive, you can download it from  
the page http://pmwiki.org/Subversion (only pmwiki.php changed). Please  
report any problems or difficulties.


kirpi at kirpi.it writes:
> > The first page uses an earlier recipe from 2007
> > [...]
> > http://www.pmwiki.org/pmwiki/uploads/Cookbook/markupexpr.php
> Thank you Petko for your explanation :-)
> I tried and paste some of the markupexpr.php code into my config.php
> Fearing that it could clash with the ftime in use today, I dared to
> change any "ftime" occurrence with "meftime".
> Yet, when in use in pages like Cookbook/CopyPasteCalendar it makes  
> disasters :-)
> Probably the game is much more complicated than I naively guessed.
> (and yes, of course I do not understand what that code does, too complicated)
> What if one need to subtract 1 or 2 days from a certain date?
> Looking on Google, there seems to be many (supposedly) easy ways, for
> instance this javascript
>    yourDate.setDate(yourDate.getDate() - daysToSubtract);
> which looks easy to understand, but at the end I cannot imagine a way
> to actually use it on a wiki page.
> Is there any workaround, please?
> (if not, no problem: one cannot have everything in life)

More information about the pmwiki-users mailing list