[pmwiki-users] Using PTVs inside php on a page for calculating days difference between dates

Hans Bracker design at softflow.co.uk
Fri Sep 26 11:02:59 CDT 2014


> *I* used the php code *you* provided and...
> it all works astonishingly well!
> :-)

well, I did test it before posting it! ;)

> Once more, despite your documentation page[1] (perhaps technically
> correct, but a bit "dry" for non expert people), I could have never
> imagined how to build such thing.
> Actually, this very sample case (date difference calculation) could
> perhaps be included in your documentation page in order to offer a
> practical example?
> I guess so because a lot of things (again those ptv_ prefix, as an
> instance) are far from easy to understand for non_coders.
> Thus, a little example might be of benefit to many.

I  agree,  examples  may  be helpful. And a lot more work could be put
into the Fox documentation. But then: creating a foxfilter function is
a  coding  issue.  You  need  to  know something about PHP. Still, one
example would be good there.

But  I  don't  quite  like  this example with the call to DateTime, as
DateTime is a method to create an object, and I never quite understand
object  oriented  programming.  All  the  fox.php code is old-fashioned
process  oriented.  If  Fox  was  written with Objects it may be a lot
better code, but I could not have done it. So there is my limitation!


cheers,
 Hans                         
mailto:design at softflow.co.uk
www.softflow.co.uk




More information about the pmwiki-users mailing list