可能重复:
如何计算年,月,日的年龄?
我想计算出生日期的人的年龄和相对于当前日期的年,月和日的当前日期.
例如:
>>> calculate_age(2008, 01, 01)
1 years, 0 months, 16 days
Run Code Online (Sandbox Code Playgroud) 如果我有两个约会,那么我会在几天内得到它们之间的区别像这篇文章.
如何在以下视图中详细说明:
将日期转换为(number of years,number of months and the rest in the number of days)