Monday, May 12, 2014

Days seems to be the largest time unit in a TimeSpan type in C#.

The number in Days may be over 30. It may be in the thousands. The number of days is not the number of days since the last complete month. The months just are not measured. The number of Days is the number of full days in the window of time while TotalDays will also have a decimal and some digits for the piece of the not full "last" day bolted on to the end of the number. Hours on the other hand is not a count of all of the hours in the TimeSpan. It represents the number of full hours left in the window of time after you take away all of the full days. Days are Hours and thus calculated very differently.

No comments:

Post a Comment