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

Patrick R. Michaud pmichaud at pobox.com
Wed Feb 27 13:46:54 CST 2008


On Wed, Feb 27, 2008 at 07:21:58PM +0000, Hans wrote:
> Wednesday, February 27, 2008, 7:05:55 PM, Randy wrote:
> 
> > I realize PmWiki may have to do it that way, but that presents a  
> > problem:
> 
> just a note that udays and utime uses php function strtotime to convert time
> formatted strings into a unified format. PmWiki i think is using a
> more complex approach. You may find that your tests will have
> different results if you use udays or utime than ftime %s.

PmWiki _also_ uses strtotime, but it also checks for some things
that strtotime doesn't quite understand properly:

    yyyy-mm-dd          ISO date
    yyyy-mm-ddThh:mm    ISO date+time
    @nnnnnnnnn          Unix timestamp
    now
    today
    tomorrow
    yesterday

If the time format doesn't match any of the above, then PmWiki
calls strtotime and uses that.

Pm



More information about the pmwiki-users mailing list