-
Notifications
You must be signed in to change notification settings - Fork 1
intervals.utils.datetimeextensions
Namespace: Intervals.Utils
public static class DateTimeExtensionsInheritance Object → DateTimeExtensions
Returns the smallest value aligned to that is greater than or equal to the specified
public static DateTime Ceiling(DateTime dateTime, TimeSpan granuleSize)dateTime DateTime
granuleSize TimeSpan
Returns the smallest value aligned to month that is greater than or equal to the specified
public static DateTime CeilingToMonth(DateTime dateTime)dateTime DateTime
Returns the smallest value aligned to quarter that is greater than or equal to the specified
public static DateTime CeilingToQuarter(DateTime dateTime)dateTime DateTime
Returns the smallest value aligned to half-year that is greater than or equal to the specified
public static DateTime CeilingToHalfYear(DateTime dateTime)dateTime DateTime
Returns the smallest value aligned to year that is greater than or equal to the specified
public static DateTime CeilingToYear(DateTime dateTime)dateTime DateTime
Returns the quarter number for the specified
public static int GetQuarter(DateTime dateTime)dateTime DateTime
Int32
quarter number
Returns the half-year number for the specified
public static int GetHalfYear(DateTime dateTime)dateTime DateTime
Int32
half-year number
Returns the largest value aligned to that is less than or equal to the specified
public static DateTime Floor(DateTime dateTime, TimeSpan granuleSize)dateTime DateTime
granuleSize TimeSpan
Returns the largest value aligned to month that is less than or equal to the specified
public static DateTime FloorToMonth(DateTime dateTime)dateTime DateTime
Returns the largest value aligned to quarter that is less than or equal to the specified
public static DateTime FloorToQuarter(DateTime dateTime)dateTime DateTime
Returns the largest value aligned to half-year that is less than or equal to the specified
public static DateTime FloorToHalfYear(DateTime dateTime)dateTime DateTime
Returns the largest value aligned to year that is less than or equal to the specified
public static DateTime FloorToYear(DateTime dateTime)dateTime DateTime
Rounds a to a value aligned to , and uses the specified rounding convention for midpoint values.
public static DateTime Round(DateTime dateTime, TimeSpan granuleSize, MidpointRounding midpointRounding)dateTime DateTime
granuleSize TimeSpan
midpointRounding MidpointRounding
Rounds a to a value aligned to month, and uses the specified rounding convention for midpoint values.
public static DateTime RoundToMonth(DateTime dateTime, MidpointRounding midpointRounding)dateTime DateTime
midpointRounding MidpointRounding
Rounds a to a value aligned to quarter, and uses the specified rounding convention for midpoint values.
public static DateTime RoundToQuarter(DateTime dateTime, MidpointRounding midpointRounding)dateTime DateTime
midpointRounding MidpointRounding
Rounds a to a value aligned to half-year, and uses the specified rounding convention for midpoint values.
public static DateTime RoundToHalfYear(DateTime dateTime, MidpointRounding midpointRounding)dateTime DateTime
midpointRounding MidpointRounding
Rounds a to a value aligned to year, and uses the specified rounding convention for midpoint values.
public static DateTime RoundToYear(DateTime dateTime, MidpointRounding midpointRounding)dateTime DateTime
midpointRounding MidpointRounding