I have dates stored as Unix timestamps. I'd like to display the date in 
some other format. Is there a way to access, and change a PTV as it gets 
displayed on a PmForm?

Some things I've tried:
1] Using markup expressions in the PmForm form defintion. I don't seem 
to be able to reference the PTV at this point though (I've tried 
{$$ptv_varname}, {$:varname}):
(:input pmform target="my target":)
(:input default source="{*$FullName}":)
(:input default request=1:)
(:input default $:entrydate "{(ftime fmt="%d-%m-%Y %H:%M" 
@{$$ptv_entrydate} )}":)
(:input end:)

2] Defining a markup to alter the format. The markup fires, and 
according to action=ruleset, executes before PmForms, but the original 
Unix date is displayed.
   Markup('entrydate', 'fulltext',
     '/\(:entrydate:([0-9]+):\)/e',
     "'(:entrydate:'.strftime('%d-%m-%Y %H:%M', $1).':)'");


  ~ ~ Dave

_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to