summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2faac79)
raw | patch | inline | side by side (parent: 2faac79)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 6 Apr 2004 21:56:10 +0000 (21:56 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 6 Apr 2004 21:56:10 +0000 (21:56 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2259 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/date.py | patch | blob | history |
diff --git a/roundup/date.py b/roundup/date.py
index a8d6ef3b09817ea0963c0663e806a09eb0dfa5f5..8d84c6ff505642f4faca7fd93f3e8e183b352d6b 100644 (file)
--- a/roundup/date.py
+++ b/roundup/date.py
# 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.
"""
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
+ <Date 2004-04-06.22:04:20.766830>
+ >>> d2=Date('2003-07-01')
+ >>> d2
+ <Date 2003-07-01.00:00:0.000000>
+ >>> d1-d2
+ <Interval + 280d 22:04:20>
+ >>> i1=_
+ >>> d2+i1
+ <Date 2004-04-06.22:04:20.000000>
+ >>> d1-i1
+ <Date 2003-07-01.00:00:0.000000>
'''
def __init__(self, spec='.', offset=0, add_granularity=0):