Message1919
Logged In: NO
Okay. Just fixed the problem for myself by introduction of a
"short" format.
This should do the trick for now. Patch included.
I would appreciate seeing this going into roundup. If you
need legal statement, contact greve@fsfeurope.org. Also, I
would still appreciate a shorter (visual?) form for
"Activity" which also wastes space...
Oh well. Won't do anything about that right now.
Hope this helps.
Georg
--- date.py.orig 2005-03-24 21:08:18.399146294 +0100
+++ date.py 2005-03-24 21:32:27.441344141 +0100
@@ -355,6 +355,10 @@ class Date:
return f%(self.year, self.month, self.day,
self.hour, self.minute,
self.second)
+ def short(self, offset=0):
+ f = '%04d-%02d-%02d %02d:%02d'%(self.year,
self.month, self.day, self.hour + offset, self.minute)
+ return f[2:]
+
def pretty(self, format='%d %B %Y'):
''' print up the date date using a pretty format...
--- cgi/templating.py.orig 2005-03-24 21:26:55.568646572 +0100
+++ cgi/templating.py 2005-03-24 21:32:48.095524732 +0100
@@ -1301,6 +1301,19 @@ class DateHTMLProperty(HTMLProperty):
value, anonymous=anonymous)
self._offset = offset
+ def short(self):
+ ''' Render a "short" representation of the property
+ '''
+ self.view_check()
+
+ if self._value is None:
+ return ''
+ if self._offset is None:
+ offset = self._db.getUserTimezone()
+ else:
+ offset = self._offset
+ return str(self._value.short(offset))
+
def plain(self):
''' Render a "plain" representation of the property
'''
|
|
Date |
User |
Action |
Args |
2009-02-03 14:21:17 | admin | link | issue1170119 messages |
2009-02-03 14:21:17 | admin | create | |
|