[pmwiki-users] pagevariable for creation time

Jon Haupt jhaupt at gmail.com
Wed May 9 15:24:26 CDT 2007


On 5/9/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > Is it actually possible to use a page variable as the "when" in
> > {(ftime)} expressions?
>
> We likely want to create some page variables for this.  Of course,
> if a page's name already has a date of some sort in it, then one
> can do:
>
>     {(ftime {$Name})}
>
> But I'm thinking we might want to have *ISO versions of the
> various date/time expressions.  I'm still coming up with names
> for these.  My best guess at the moment is one of:
>
>     {$LastModifiedISO}            # output form yyyy-mm-ddThh:mm:ss
>     {$CreatedISO}
>
> or
>
>     @{$mtime}                     # output as @1178735110
>     @{$ctime}
>
> Either of these would then work as inputs to {(ftime)}.
>
> Suggestions welcomed.
>
> Pm
>

I like the {$CreatedISO} example.  It's easy to figure out what that
means, and what's displayed makes sense given the variable name.  The
reason this came up, incidentally, is that I have been thinking about
the way we add tons of page variables for different date formats for
BlogSimple and BlogSimple2, and how nice it would be to just have one
PV {$CreatedISO} that could be formatted in many ways on the fly using
{(ftime)}.  I tried to create such a page variable, but couldn't
figure out how to do it right.

Jon



More information about the pmwiki-users mailing list