Table of Contents

Ceiling Method

Definition

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

Ceiling(DateTime, double, TimeUnit)

Returns a DateTime value that is rounded towards positive infinity.

public static DateTime Ceiling(this DateTime value, double interval, TimeUnit timeUnit)

Parameters

value DateTime

The DateTime to extend.

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

DateTime

A DateTime value that is rounded towards positive infinity.

Exceptions

ArgumentOutOfRangeException

interval is 0.

Ceiling(DateTime, TimeSpan)

Returns a DateTime value that is rounded towards positive infinity.

public static DateTime Ceiling(this DateTime value, TimeSpan interval)

Parameters

value DateTime

The DateTime to extend.

interval TimeSpan

The TimeSpan value that specifies the rounding of value.

Returns

DateTime

A DateTime value that is rounded towards positive infinity.