示例#1
0
 /// <summary>
 /// Returns a <see cref="DateTime"/> value that is rounded towards negative 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 negative infinity.</returns>
 /// <exception cref="ArgumentOutOfRangeException">
 /// <paramref name="interval"/> is 0.
 /// </exception>
 public static DateTime Floor(this DateTime value, double interval, TimeUnit timeUnit)
 {
     return(DateTimeUtility.Floor(value, interval, timeUnit));
 }
示例#2
0
 /// <summary>
 /// Returns a <see cref="DateTime"/> value that is rounded towards negative 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 negative infinity.</returns>
 public static DateTime Floor(this DateTime value, TimeSpan interval)
 {
     return(DateTimeUtility.Floor(value, interval));
 }