Is TimeSpan unnecessary?

后端 未结 9 1971
野的像风
野的像风 2020-12-15 06:33

EDIT 2009-Nov-04

OK, so it\'s been a little while since I first posted this question. It seems to me that many of the initial responders failed to r

9条回答
  •  醉酒成梦
    2020-12-15 06:51

    There are a lot of complications in dates, for example:

    • leap years
    • leap seconds
    • the 1582 change to the gregorian calendar
    • the fact that there is no such thing as 0 years
    • differences in the lengths of months

    Treating Dates and TimeSpans as different things means that these kinds of issues are much less likely to confuse you in practise.

提交回复
热议问题