Skip to content

Commit

Permalink
Adjust timespan extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
I-RzR-I committed May 29, 2024
1 parent 54df4f9 commit 4daeca6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#region U S A G E S

using System;
using DomainCommonExtensions.CommonExtensions;

#endregion

Expand All @@ -35,6 +36,8 @@ public static class TimeSpanExtension
/// <remarks></remarks>
public static TimeSpan Absolute(this TimeSpan source)
{
if (source.IsNull()) return TimeSpan.Zero;

return source.Ticks.IsGreaterThanOrEqualZero() ? source : source.Negate();
}
}
Expand Down

0 comments on commit 4daeca6

Please sign in to comment.