[pmwiki-users] Show current date

Hans design at softflow.co.uk
Mon Feb 27 14:22:10 CST 2006


Monday, February 27, 2006, 7:24:23 PM, Johs. wrote:
> Right now I'd like to know how to display the current date. It is 
> extremeny easy with core PHP, but I cannot figure out how the PmWiki
> manages the code.

It is easy to define it as a page variable in config.php:
Examples:

add page variable {$Today} formatted as yyyy-mm-dd
    $FmtPV['$Today'] = 'strftime("%Y-%m-%d", time() )';
    
or add page variable {$Today} formatted as dd month yyyy
    $FmtPV['$Today'] = 'strftime("%d %B %Y", time() )';

Use $page["time"] instead of time() to get the time the page was last
modified.
Use $page["ctime"] instead of time() to get the time the page was
created.
Use suitable variable names instead of $Today

hope this helps a bit.
sorry it does not answer your general questions on how to create page
variables, wiki styles and markup directives.
There are pages in the documentation about CustomWikiStyles %...%
and about CustomMarkup (:...:), none yet about CustomPageVariables
{$...}.

Best, 
~Hans                           





More information about the pmwiki-users mailing list