This is preliminary documentation and is subject to change.

TimeSpanExtensions Class

The extension methods for working with TimeSpan objects.

Definition

Namespace: MoreDateTime.Extensions
Assembly: MoreDateTime (in MoreDateTime.dll) Version: 1.3.0
C#
public static class TimeSpanExtensions
Inheritance
Object    TimeSpanExtensions

Methods

IsNegative Returns if the value is negative
IsPositive Returns if the value is positive
RoundTo Rounds the TimeSpan mathematically to the next unit of the given precision.
RoundToDay Rounds the TimeSpan mathematically to the day
RoundToHour Rounds the TimeSpan mathematically to the Hour
RoundToMinute Rounds the TimeSpan mathematically to the Minute
RoundToSecond Rounds the TimeSpan mathematically to the Second
TruncateTo Truncates the precision of a TimeSpan object to the given precision
TruncateToDay Truncates the precision of a DateTime object to the year
TruncateToHour Truncates the precision of a TimeSpan object to the hour
TruncateToMinute Truncates the precision of a TimeSpan object to the minute
TruncateToSecond Truncates the precision of a TimeSpan object to the second

See Also