Date Comparison
Mark Wooding
mdw at distorted.org.uk
Tue Feb 3 11:10:59 EST 2009
mohana2004 at gmail.com writes:
> I need to compare two dates and find the number of days between those
> two dates.This can be done with datetime module in python as below,
> but this is not supported in Jython.
>
> example
> from datetime import date
> a=datetime.date(2009,2,1)
> b=datetime.date(2008,10,10)
> c= a-b
> c.days
> 114
I don't understand your problem.
Jython 2.2.1 on java1.6.0_0
Type "copyright", "credits" or "license" for more information.
>>> from datetime import date
>>> a=datetime.date(2009,2,1)
>>> b=datetime.date(2008,10,10)
>>> c = a - b
>>> c.days
114
-- [mdw]
More information about the Python-list
mailing list