NullableDateTimeExtensions extension

on

Methods

differenceTo(DateTime? other) Duration?

Available on DateTime?, provided by the NullableDateTimeExtensions extension

Safely calculates the difference between two nullable DateTime objects Returns null if either this or other is null, otherwise returns the Duration difference
differenceToTimeOfDay(DateTime? other) TimeOfDay?

Available on DateTime?, provided by the NullableDateTimeExtensions extension

Safely calculates the difference between two nullable DateTime objects as TimeOfDay Returns null if either this or other is null, otherwise returns the TimeOfDay difference