[Zope] ZPT: getting the current year

Max M maxm at mxm.dk
Sat Aug 23 20:12:59 EDT 2003


martin f krafft wrote:

> i am sure this is easy as hell, but as much as i tried, i did not
> yet arrive. please spare me the agony of listing all the things
> i tried, could someone just please give me a tal:define statement
> that stores the current year in four digit form into a variable for
> use in a ZPT?


untested:

<tal:block tal:define="global current_year 
python:here.ZopeTime().strftime('%Y')">
</tal:block>

regards Max M




More information about the Zope mailing list