Date difference in years using C# [duplicate]
问题 This question already has an answer here: How do I calculate someone's age in C#? 61 answers How can I calculate date difference between two dates in years? For example: (Datetime.Now.Today() - 11/03/2007) in years. 回答1: I have written an implementation that properly works with dates exactly one year apart. However, it does not gracefully handle negative timespans, unlike the other algorithm. It also doesn't use its own date arithmetic, instead relying upon the standard library for that. So