Quick help for a python newby, please
Thomas Nyberg
tomuxiong at gmx.com
Wed Nov 23 09:42:25 EST 2016
On 11/23/2016 09:18 AM, jones.dayton at gmail.com wrote:
>
> but how do I replace the "2008, 8, 18" and "2008, 9, 26" with *my* values? I've tried several things (which I can't remember all of) but usually end up with an error like this:
>
Does this not work for you?
d = date(byear, bmonth, bday)
Then you could write something like:
diff = date.today() - d
Of course you'll need to a do a bit more work to deal with years (e.g.
has your birthday happened this year yet or not?), but does this not fix
your problem?
Cheers,
Thomas
More information about the Python-list
mailing list