<?php /* PMWiki module datetimestamp.phpinc VERSION:: 2004-08-31 tested with pmwiki.1.0.2 activate this by the following statement in local/config.php: include_once("local/datetimestamp.phpinc"); replaces "[[datetime]]" by the current datetimestamp in the specified format replaces "[[date]]" by the current datestamp in the specified format replaces "[[time]]" by the current timestamp in the specified format the outputformat can be specified in the variables $timeFmt, $dateFmt and $datetimeFmt in config.php before including the module formatstring according to arguments of the php-function date() (see php-manual) (samples see below) you can define styles for the classes .date, .datetime and .time in your css-files docs see Cookbook.DateTimeStamp knut alboldt, (alboldt at gmx.net) changes: 2004-08-31 added support for styles (question from Jason Moseley in pmwiki-maillist 2004/08/31) 2004-02-26 first implementation */ # SDV($timeFmt,"h:i:s T"); SDV($timeFmt,"h:i:s"); # SDV($DateFmt,"D, d. F Y"); SDV($dateFmt,"d.m.Y"); SDV($datetimeFmt,$dateFmt . ", " . $timeFmt); $DoubleBrackets["/\\[\\[datetime\\]\\]/e"] = "'<span class=\"datetime\">'.date('$datetimeFmt').'</span>';"; $DoubleBrackets["/\\[\\[date\\]\\]/e"] = "'<span class=\"date\">'.date('$dateFmt').'</span>';"; $DoubleBrackets["/\\[\\[time\\]\\]/e"] = "'<span class=\"time\">'.date('$timeFmt').'</span>';"; ?>