2 ms·
Try your test cases in other languages. E.G. python3 import datetime ; (datetime.datetime.strptime("2019-01-31","%Y-%m-%d") - datetime.datetime.strptime("2012-
by mjevans 5y ago
Try your test cases in other languages. E.G. python3 import datetime ; (datetime.datetime.strptime("2019-01-31","%Y-%m-%d") - datetime.datetime.strptime("2012-02-29","%Y-%m-%d"))
The result, which reminds me of one of the other reasons I avoid python for trivial projects, is the duration / interval answer of days=2528.
Part of the bug is surely in Wolfram|Alpha returning the interval broken out in human durations; but importantly those durations __don't use fixed time values__. The precise length of a //year// and of a //month// are variable.
I still suspect there's double or single counting of leap-days in those durations as the reverse ones clash with converting a duration back to a whole number.