[Zope] ZPT: getting the current year

Paul Winkler pw_lists at slinkp.com
Sat Aug 23 01:12:31 EDT 2003


On Wed, Aug 20, 2003 at 03:38:09PM +0200, 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?

http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixB.stx
(search for DateTime) 

example:
<span tal:define="year python:DateTime().year()"> </span>

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's TOMATO CONDOM!
(random hero from isometric.spaceninja.com)



More information about the Zope mailing list