DateTimeListExtension extension

on

Methods

diff() Iterable<Duration>

Available on List<DateTime>, provided by the DateTimeListExtension extension

get Duration between each elemnt of a List of DateTimes
findBlocks([Duration delta = const Duration(minutes: 2)]) Iterable<Timespan>

Available on List<DateTime>, provided by the DateTimeListExtension extension

find continuous blocks of DateTimes in a List<DateTime>. Every section of one or more blocks where the Duration between each element and its neighbours is less than delta is counted as a block