Date Comparison and Manipulation Functions?
W. eWatson
notvalid2 at sbcglobal.net
Fri Aug 29 12:32:01 EDT 2008
I just tried the following code, and got an unexpected result.
from pyfdate import *
t = Time()
ts = Time(2008, 8, 29,15,20,7)
tnew = ts.plus(months=6)
print "new date: ", tnew
Result:
new date: 2009-02-28 15:20:07
I believe that should be April 1, 2009. If I use months = 1 and day =31, I
get Sept. 30, 2008 and not Oct. 1, 2008. Is there a way to get around this?
--
W. Watson
(121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet
More information about the Python-list
mailing list