date formatting question
This is silly but in the ZPT I'm working on I can't get the bobobase modification time to format in a non-ugly fashion I tried : <a tal:attributes="href item/absolute_url" tal:content="item/bobobase_modification_time" fmt=aCommon> title</a> but it pretty much ignores the formatting suggestion. Kate
On Mon, 2003-12-01 at 17:01, Kate Legere wrote:
This is silly but in the ZPT I'm working on I can't get the bobobase modification time to format in a non-ugly fashion
I tried : <a tal:attributes="href item/absolute_url" tal:content="item/bobobase_modification_time" fmt=aCommon> title</a>
but it pretty much ignores the formatting suggestion.
Kate
<span tal:define="mtime item/bobobase_modification_time" tal:content="python:mtime.strftime('%d/%m/%Y %H:%M')">date</span> -- Frederik Vos <fvos@vosberg.be> L4L & VosBerg@SuSE
Kate Legere wrote at 2003-12-1 11:01 -0500:
This is silly but in the ZPT I'm working on I can't get the bobobase modification time to format in a non-ugly fashion
I tried : <a tal:attributes="href item/absolute_url" tal:content="item/bobobase_modification_time" fmt=aCommon> title</a>
but it pretty much ignores the formatting suggestion.
Try: <a tal:define="modTime item/bobobase_modification_time" tal:attributes="href item/absolute_url" tal:content="modTime/aCommon"> title </a> -- Dieter
Kate Legere wrote:
This is silly but in the ZPT I'm working on I can't get the bobobase modification time to format in a non-ugly fashion
I tried : <a tal:attributes="href item/absolute_url" tal:content="item/bobobase_modification_time" fmt=aCommon> title</a>
but it pretty much ignores the formatting suggestion.
Of course. That's DTML magic. ZPT doesn't do that, and will require a different, more explicit method. I like Dieter's. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
participants (4)
-
Dieter Maurer -
Frederik Vos -
J. Cameron Cooper -
Kate Legere