Twodates

Days between two dates
import sys from datetime import date a = sys.argv[1] b = sys.argv[2] [m1,d1,y1] = a.split('/') [m2,d2,y2] = b.split('/') y1 = int(y1) m1 = int(m1) d1 = int(d1) y2 = int(y2) m2 = int(m2) d2 = int(d2) t1=date(y1,m1,d1) t2=date(y2,m2,d2) print((t2-t1).days)