DateTimeSpan
Immutable structure representing a set of a monthSpan and a timeSpan. This structure loses information about which months are included, that makes it impossible to generate a real TimeSpan including months. You can use DateTimeRange.duration to get this information from two real DateTime.
Constructors
Properties
The daysIncludingWeeks part as an integer including days and weeks.
The milliseconds part as a double.
The secondsIncludingMilliseconds part as a doble including seconds and milliseconds.
From the time part, all the milliseconds including milliseconds, seconds, minutes, hours, days and weeks
From the date part, all months including months and years
From the date part, all months represented as a totalYears
Functions
Note that if milliseconds overflow months this could not be exactly true. But probably will work in most cases. This structure doesn't have information about which months are counted. So some months could have 28-31 days and thus can't be done. You can use DateTimeRange.duration to compare this with real precision using a range between two DateTime.
Represents this DateTimeSpan as a string like 50Y 10M 3W 6DH 30m 15s
. Parts that are zero, won't be included. You can omit weeks and represent them as days by adjusting the includeWeeks parameter.