[pmwiki-users] Simple Timestamp
Patrick R. Michaud
pmichaud at pobox.com
Thu Jan 12 09:19:56 CST 2006
On Thu, Jan 12, 2006 at 08:28:29AM +0100, Laurent Meister wrote:
> I want to make a simple time stamp, like the one is generated, when
> you write the 4 ~~~~.
>
> But finally I'm not happy with "~time". Something like (:timestamp:)
> for eg. would be better. So I tried this one:
>
> Markup('timestamp', 'inline', '/\\(:timestamp:\\)/','[-
> ($CurrentTime)-]');
>
> And the only thing I get, when using the (:timestamp:) Markup in the
> Wiki is:
>
> ()
>
> What did I wrong?
The value of $CurrentTime isn't set until after local customizations
are performed (because $CurrentTime depends on the setting for $TimeFmt
which depends on i18n).
So, it's probably easier to simply do the time formatting directly
rather than using $CurrentTime.
On another note, if the [-...-] are intended to produce smaller
text, then you want to make sure this rule occurs before the [-...-]
markup rule (which is itself "inline"). Thus:
Markup('timestamp', '<[-'
'/\\(:timestamp:\\)/',
strftime("[-$TimeFmt-]", $Now));
Pm
More information about the pmwiki-users
mailing list