diff --git a/src/DomainCommonExtensions/DataTypeExtensions/TimeSpanExtension.cs b/src/DomainCommonExtensions/DataTypeExtensions/TimeSpanExtension.cs index 137c964..4abc717 100644 --- a/src/DomainCommonExtensions/DataTypeExtensions/TimeSpanExtension.cs +++ b/src/DomainCommonExtensions/DataTypeExtensions/TimeSpanExtension.cs @@ -17,6 +17,7 @@ #region U S A G E S using System; +using DomainCommonExtensions.CommonExtensions; #endregion @@ -35,6 +36,8 @@ public static class TimeSpanExtension /// public static TimeSpan Absolute(this TimeSpan source) { + if (source.IsNull()) return TimeSpan.Zero; + return source.Ticks.IsGreaterThanOrEqualZero() ? source : source.Negate(); } }