sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #05726
Re: [Question #172656]: calculate an age using two dates
Question #172656 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/172656
Status: Open => Answered
vitalliuss proposed the following answer:
Try this:
from datetime import *
d = date(1990, 5, 29)
now = date.today()
timedelta = now-d
years = str(timedelta/365).split(' ')
print years[0]
Also this page can be helpful:
http://docs.python.org/library/datetime.html
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.