[Checkins] SVN: van.timeformat/trunk/ last minute tweak and prepare release
Brian Sutherland
jinty at web.de
Thu Nov 20 19:11:02 EST 2008
Log message for revision 93207:
last minute tweak and prepare release
Changed:
U van.timeformat/trunk/CHANGES.txt
U van.timeformat/trunk/van/timeformat/README.txt
U van.timeformat/trunk/van/timeformat/__init__.py
-=-
Modified: van.timeformat/trunk/CHANGES.txt
===================================================================
--- van.timeformat/trunk/CHANGES.txt 2008-11-21 00:10:22 UTC (rev 93206)
+++ van.timeformat/trunk/CHANGES.txt 2008-11-21 00:11:01 UTC (rev 93207)
@@ -1,7 +1,7 @@
Changes
=======
-1.0.0 (Unreleased)
+1.0.0 (2008-11-21)
------------------
- Initial Release
Modified: van.timeformat/trunk/van/timeformat/README.txt
===================================================================
--- van.timeformat/trunk/van/timeformat/README.txt 2008-11-21 00:10:22 UTC (rev 93206)
+++ van.timeformat/trunk/van/timeformat/README.txt 2008-11-21 00:11:01 UTC (rev 93207)
@@ -25,7 +25,7 @@
If no format argument is specified, dates and datetimes are formatted using .isoformat(" "):
>>> print timefmt(mydatetime)
- 1975-12-17 05:24:36
+ 1975-12-17T05:24:36
>>> print timefmt(mydate)
1975-12-17
@@ -33,7 +33,7 @@
The 'iso' format also triggers this:
>>> print timefmt(mydatetime, format='iso')
- 1975-12-17 05:24:36
+ 1975-12-17T05:24:36
rfc2822
+++++++
@@ -65,7 +65,7 @@
The return type is a unicode string:
>>> timefmt(mydatetime)
- u'1975-12-17 05:24:36'
+ u'1975-12-17T05:24:36'
And we can have unicode in the formats:
Modified: van.timeformat/trunk/van/timeformat/__init__.py
===================================================================
--- van.timeformat/trunk/van/timeformat/__init__.py 2008-11-21 00:10:22 UTC (rev 93206)
+++ van.timeformat/trunk/van/timeformat/__init__.py 2008-11-21 00:11:01 UTC (rev 93207)
@@ -19,10 +19,7 @@
def timefmt(obj, format='iso'):
assert isinstance(obj, date), "format only accepts date or datetime objects"
if format == 'iso':
- if isinstance(obj, datetime):
- s = obj.isoformat(sep=" ")
- else:
- s = obj.isoformat()
+ s = obj.isoformat()
else:
format = getUtility(ITimeFormat, name=format).format
format = format.encode('utf-8')
More information about the Checkins
mailing list