Log message for revision 40382: Move things around a bit to form logically arrange methods. Fix some formatting. Add TODO comment about a questionable method.
Changed: U Zope/trunk/lib/python/DateTime/interfaces.py -=- Modified: Zope/trunk/lib/python/DateTime/interfaces.py =================================================================== --- Zope/trunk/lib/python/DateTime/interfaces.py 2005-11-26 16:24:19 UTC (rev 40381) +++ Zope/trunk/lib/python/DateTime/interfaces.py 2005-11-27 17:15:04 UTC (rev 40382) @@ -32,6 +32,7 @@ # Conversion and comparison methods + #TODO determine whether this method really is part of the public API def localZone(ltm=None): '''Returns the time zone on the given date. The time zone can change according to daylight savings.''' @@ -79,6 +80,10 @@ falls within the current minute, in the context of this object's timezone representation""" + def isLeapYear(): + """Return true if the current year (in the context of the + object's timezone) is a leap year""" + def earliestTime(): """Return a new DateTime object that represents the earliest possible time (in whole seconds) that still falls within the @@ -149,10 +154,6 @@ __le__ = lessThanEqualTo - def isLeapYear(): - """Return true if the current year (in the context of the - object's timezone) is a leap year""" - def dayOfYear(): """Return the day of the year, in context of the timezone representation of the object""" @@ -277,30 +278,29 @@ # New formats def fCommon(): - """Return a string representing the object\'s value in the + """Return a string representing the object's value in the format: March 1, 1997 1:45 pm""" def fCommonZ(): - """Return a string representing the object\'s value in the + """Return a string representing the object's value in the format: March 1, 1997 1:45 pm US/Eastern""" def aCommon(): - """Return a string representing the object\'s value in the + """Return a string representing the object's value in the format: Mar 1, 1997 1:45 pm""" def aCommonZ(): - """Return a string representing the object\'s value in the + """Return a string representing the object's value in the format: Mar 1, 1997 1:45 pm US/Eastern""" def pCommon(): - """Return a string representing the object\'s value in the + """Return a string representing the object's value in the format: Mar. 1, 1997 1:45 pm""" def pCommonZ(): - """Return a string representing the object\'s value + """Return a string representing the object's value in the format: Mar. 1, 1997 1:45 pm US/Eastern""" - def ISO(): """Return the object in ISO standard format. Note: this is *not* ISO 8601-format! See the ISO8601 and HTML4 methods below @@ -332,6 +332,18 @@ The time is in UTC. """ + def JulianDay(): + """Return the Julian day according to + http://www.tondering.dk/claus/cal/node3.html#sec-calcjd + """ + + def week(): + """Return the week number according to ISO + see http://www.tondering.dk/claus/cal/node6.html#SECTION00670000000000000000 + """ + + # Python operator and conversion API + def __add__(other): """A DateTime may be added to a number and a number may be added to a DateTime; two DateTimes cannot be added.""" @@ -371,13 +383,3 @@ def __float__(): """Convert to floating-point number of seconds since the epoch (gmt)""" - - def JulianDay(): - """Return the Julian day according to - http://www.tondering.dk/claus/cal/node3.html#sec-calcjd - """ - - def week(): - """Return the week number according to ISO - see http://www.tondering.dk/claus/cal/node6.html#SECTION00670000000000000000 - """ _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins