Table of Contents

Floor Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/TimeSpanExtensions.cs

Floor(TimeSpan, TimeSpan)

Returns a TimeSpan value that is rounded towards negative infinity.

public static TimeSpan Floor(this TimeSpan value, TimeSpan interval)

Parameters

value TimeSpan

A TimeSpan value to be rounded.

interval TimeSpan

The TimeSpan value that specifies the rounding of value.

Returns

TimeSpan

A TimeSpan value that is rounded towards negative infinity.

Floor(TimeSpan, double, TimeUnit)

Returns a TimeSpan value that is rounded towards negative infinity.

public static TimeSpan Floor(this TimeSpan value, double interval, TimeUnit timeUnit)

Parameters

value TimeSpan

A TimeSpan value to be rounded.

interval double

The double value that in combination with timeUnit specifies the rounding of value.

timeUnit TimeUnit

One of the enumeration values that specifies the time unit of interval.

Returns

TimeSpan

A TimeSpan value that is rounded towards negative infinity.