[pmwiki-users] How to: calculate how many days left

Hans design5 at softflow.co.uk
Tue Feb 26 03:51:51 CST 2008


Tuesday, February 26, 2008, 4:29:26 AM, imoc wrote:

> The 'Date' field is a PTV insert by hand. The 'Appointment' field 
> is page title which I can click to edit or see the further detail.

> Now I'd like to add a new field to show  how many days left from 
> today to the due day.

use http://www.pmwiki.org/wiki/Cookbook/MarkupExprPlus
this adds basic math markup expressions.
Then you can write for how many days between Date PTV and now:

{(sub (ftime %j {$:Date}) (ftime %j now) )}


  ~Hans




More information about the pmwiki-users mailing list