Floor Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
Floor(DateTime, TimeSpan)
Returns a DateTime value that is rounded towards negative infinity.
public static DateTime Floor(this DateTime value, TimeSpan interval)
Parameters
valueDateTimeThe DateTime to extend.
intervalTimeSpanThe TimeSpan value that specifies the rounding of
value.
Returns
Floor(DateTime, double, TimeUnit)
Returns a DateTime value that is rounded towards negative infinity.
public static DateTime Floor(this DateTime value, double interval, TimeUnit timeUnit)
Parameters
valueDateTimeThe DateTime to extend.
intervaldoubleThe double value that in combination with
timeUnitspecifies the rounding ofvalue.timeUnitTimeUnitOne of the enumeration values that specifies the time unit of
interval.
Returns
Exceptions
- ArgumentOutOfRangeException
intervalis 0.