[Checkins] SVN: DateTime/trunk/src/DateTime/DateTime.py Move functions before classes
Hanno Schlichting
hannosch at hannosch.eu
Sun May 8 07:41:40 EDT 2011
Log message for revision 121581:
Move functions before classes
Changed:
U DateTime/trunk/src/DateTime/DateTime.py
-=-
Modified: DateTime/trunk/src/DateTime/DateTime.py
===================================================================
--- DateTime/trunk/src/DateTime/DateTime.py 2011-05-08 11:40:14 UTC (rev 121580)
+++ DateTime/trunk/src/DateTime/DateTime.py 2011-05-08 11:41:40 UTC (rev 121581)
@@ -310,6 +310,21 @@
return "%+03d:%02d" % divmod((seconds / 60), 60)
+class strftimeFormatter:
+
+ def __init__(self, dt, format):
+ self._dt=dt
+ self._f=format
+
+ def __call__(self):
+ return self._dt.strftime(self._f)
+
+
+def Timezones():
+ """Return the list of recognized timezone names"""
+ return sorted(list(PytzCache._zmap.values()))
+
+
class DateTime(object):
"""DateTime objects represent instants in time and provide
interfaces for controlling its representation without
@@ -1847,19 +1862,3 @@
out.write('<value><dateTime.iso8601>')
out.write(self.ISO8601())
out.write('</dateTime.iso8601></value>\n')
-
-
-class strftimeFormatter:
-
- def __init__(self, dt, format):
- self._dt=dt
- self._f=format
-
- def __call__(self):
- return self._dt.strftime(self._f)
-
-
-# Module methods
-def Timezones():
- """Return the list of recognized timezone names"""
- return sorted(list(PytzCache._zmap.values()))
More information about the checkins
mailing list