From: richard Date: Tue, 6 Apr 2004 21:56:10 +0000 (+0000) Subject: add more doc to date.py X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bbb698fa42c6c63378f9eca2b4045800ebb2fb13;p=roundup.git add more doc to date.py git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2259 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/date.py b/roundup/date.py index a8d6ef3..8d84c6f 100644 --- a/roundup/date.py +++ b/roundup/date.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: date.py,v 1.63 2004-03-24 04:57:25 richard Exp $ +# $Id: date.py,v 1.64 2004-04-06 21:56:10 richard Exp $ """Date, time and time interval handling. """ @@ -90,6 +90,22 @@ class Date: The date format 'yyyymmddHHMMSS' (year, month, day, hour, minute, second) is the serialisation format returned by the serialise() method, and is accepted as an argument on instatiation. + + The date class handles basic arithmetic:: + + >>> d1=Date('.') + >>> d1 + + >>> d2=Date('2003-07-01') + >>> d2 + + >>> d1-d2 + + >>> i1=_ + >>> d2+i1 + + >>> d1-i1 + ''' def __init__(self, spec='.', offset=0, add_granularity=0):