compareTo

open operator override fun compareTo(other: DateTimeSpan): Int

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.