-from Components.Converter.Converter import Converter
+from Converter import Converter
from time import localtime, strftime
+from Components.Element import cached
class ClockToText(Converter, object):
DEFAULT = 0
# add: date, date as string, weekday, ...
# (whatever you need!)
- def __init__(self, type, *args, **kwargs):
- Converter.__init__(self)
+ def __init__(self, type):
+ Converter.__init__(self, type)
if type == "WithSeconds":
self.type = self.WITH_SECONDS
elif type == "InMinutes":
else:
self.type = self.DEFAULT
+ @cached
def getText(self):
time = self.source.time
if time is None: