Ceiling Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
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
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.
Ceiling(DateTime, TimeSpan)
Returns a DateTime value that is rounded towards positive infinity.
public static DateTime Ceiling(this DateTime value, TimeSpan interval)
Parameters
valueDateTimeThe DateTime to extend.
intervalTimeSpanThe TimeSpan value that specifies the rounding of
value.