/// <summary> /// Returns a <see cref="DateTime"/> value that is rounded towards positive infinity. /// </summary> /// <param name="value">A <see cref="DateTime"/> value to be rounded.</param> /// <param name="interval">The <see cref="double"/> value that in combination with <paramref name="timeUnit"/> specifies the rounding of <paramref name="value"/>.</param> /// <param name="timeUnit">One of the enumeration values that specifies the time unit of <paramref name="interval"/>.</param> /// <returns>A <see cref="DateTime"/> value that is rounded towards positive infinity.</returns> /// <exception cref="ArgumentOutOfRangeException"> /// <paramref name="interval"/> is 0. /// </exception> public static DateTime Ceiling(this DateTime value, double interval, TimeUnit timeUnit) { return(DateTimeUtility.Ceiling(value, interval, timeUnit)); }
/// <summary> /// Returns a <see cref="DateTime"/> value that is rounded towards positive infinity. /// </summary> /// <param name="value">A <see cref="DateTime"/> value to be rounded.</param> /// <param name="interval">The <see cref="TimeSpan"/> value that specifies the rounding of <paramref name="value"/>.</param> /// <returns>A <see cref="DateTime"/> value that is rounded towards positive infinity.</returns> public static DateTime Ceiling(this DateTime value, TimeSpan interval) { return(DateTimeUtility.Ceiling(value, interval)); }