Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 1452:e58002599038 maint-0.5
fixed args to some date templating methods
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 19 Feb 2003 23:26:15 +0000 |
| parents | 293653d08292 |
| children | 9e8ff9784a5f |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Wed Feb 12 00:03:38 2003 +0000 +++ b/roundup/cgi/templating.py Wed Feb 19 23:26:15 2003 +0000 @@ -916,7 +916,8 @@ return interval.pretty() return str(interval) - def pretty(self, format='%d %B %Y'): + _marker = [] + def pretty(self, format=_marker): ''' Render the date in a pretty format (eg. month names, spaces). The format string is a standard python strftime format string. @@ -924,13 +925,16 @@ string, then it'll be stripped from the output. This is handy for the situatin when a date only specifies a month and a year. ''' - return self._value.pretty() + if format is not self._marker: + return self._value.pretty(format) + else: + return self._value.pretty() def local(self, offset): ''' Return the date/time as a local (timezone offset) date/time. ''' return DateHTMLProperty(self._client, self._nodeid, self._prop, - self._name, self._value.local()) + self._name, self._value.local(offset)) class IntervalHTMLProperty(HTMLProperty): def plain(self):
