-
Notifications
You must be signed in to change notification settings - Fork 1
intervals.intervals.intervalextensions
Namespace: Intervals.Intervals
public static class IntervalExtensionsInheritance Object → IntervalExtensions
Returns the smallest interval aligned to that is greater than or equal to the specified
public static GranularInterval<DateTime> Ceiling(Interval<DateTime> interval, TimeSpan granuleSize)interval Interval<DateTime>
granuleSize TimeSpan
Returns the smallest interval aligned to month that is greater than or equal to the specified
public static GranularInterval<DateTime> CeilingToMonth(Interval<DateTime> interval)interval Interval<DateTime>
Returns the smallest interval aligned to quarter that is greater than or equal to the specified
public static GranularInterval<DateTime> CeilingToQuarter(Interval<DateTime> interval)interval Interval<DateTime>
Returns the smallest interval aligned to half-year that is greater than or equal to the specified
public static GranularInterval<DateTime> CeilingToHalfYear(Interval<DateTime> interval)interval Interval<DateTime>
Returns the smallest interval aligned to year that is greater than or equal to the specified
public static GranularInterval<DateTime> CeilingToYear(Interval<DateTime> interval)interval Interval<DateTime>
Returns the union of the specified intervals
public static IEnumerable<Interval<T>> Combine<T>(IEnumerable<Interval<T>> enumerable)T
enumerable IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the union of the specified and intervals
public static IEnumerable<Interval<T>> Combine<T>(IEnumerable<Interval<T>> left, IEnumerable<Interval<T>> right)T
left IEnumerable<Interval<T>>
right IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the union of the specified and intervals
public static IEnumerable<Interval<T>> Combine<T>(IEnumerable<Interval<T>> left, Interval<T> right)T
left IEnumerable<Interval<T>>
right Interval<T>
IEnumerable<Interval<T>>
Returns the union of the specified and intervals
public static IEnumerable<Interval<T>> Combine<T>(Interval<T> left, IEnumerable<Interval<T>> right)T
left Interval<T>
right IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the union of the specified and intervals
public static IEnumerable<Interval<T>> Combine<T>(Interval<T> left, Interval<T> right)T
left Interval<T>
right Interval<T>
IEnumerable<Interval<T>>
Returns the largest interval aligned to that is less than or equal to the specified
public static GranularInterval<DateTime> Floor(Interval<DateTime> interval, TimeSpan granuleSize)interval Interval<DateTime>
granuleSize TimeSpan
Returns the largest interval aligned to month that is less than or equal to the specified
public static GranularInterval<DateTime> FloorToMonth(Interval<DateTime> interval)interval Interval<DateTime>
Returns the largest interval aligned to quarter that is less than or equal to the specified
public static GranularInterval<DateTime> FloorToQuarter(Interval<DateTime> interval)interval Interval<DateTime>
Returns the largest interval aligned to half-year that is less than or equal to the specified
public static GranularInterval<DateTime> FloorToHalfYear(Interval<DateTime> interval)interval Interval<DateTime>
Returns the largest interval aligned to year that is less than or equal to the specified
public static GranularInterval<DateTime> FloorToYear(Interval<DateTime> interval)interval Interval<DateTime>
Returns true if the specified intervals include intervals, otherwise returns false
public static bool IsInclude<T>(IEnumerable<Interval<T>> outer, IEnumerable<Interval<T>> inner)T
outer IEnumerable<Interval<T>>
inner IEnumerable<Interval<T>>
Returns true if the specified intervals include intervals, otherwise returns false
public static bool IsInclude<T>(IEnumerable<Interval<T>> outer, Interval<T> inner)T
outer IEnumerable<Interval<T>>
inner Interval<T>
Returns true if the specified intervals include intervals, otherwise returns false
public static bool IsInclude<T>(Interval<T> outer, IEnumerable<Interval<T>> inner)T
outer Interval<T>
inner IEnumerable<Interval<T>>
Returns true if the specified intervals include intervals, otherwise returns false
public static bool IsInclude<T>(Interval<T> outer, Interval<T> inner)T
outer Interval<T>
inner Interval<T>
Returns true if the specified and intervals intersect, otherwise returns false
public static bool IsOverlap<T>(IEnumerable<Interval<T>> left, IEnumerable<Interval<T>> right)T
left IEnumerable<Interval<T>>
right IEnumerable<Interval<T>>
Returns true if the specified and intervals intersect, otherwise returns false
public static bool IsOverlap<T>(IEnumerable<Interval<T>> left, Interval<T> right)T
left IEnumerable<Interval<T>>
right Interval<T>
Returns true if the specified and intervals intersect, otherwise returns false
public static bool IsOverlap<T>(Interval<T> left, IEnumerable<Interval<T>> right)T
left Interval<T>
right IEnumerable<Interval<T>>
Returns true if the specified and intervals intersect, otherwise returns false
public static bool IsOverlap<T>(Interval<T> left, Interval<T> right)T
left Interval<T>
right Interval<T>
Returns the intersection of the specified intervals
public static IEnumerable<Interval<T>> Overlap<T>(IEnumerable<Interval<T>> enumerable)T
enumerable IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the intersection of the specified and intervals
public static IEnumerable<Interval<T>> Overlap<T>(IEnumerable<Interval<T>> left, IEnumerable<Interval<T>> right)T
left IEnumerable<Interval<T>>
right IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the intersection of the specified and intervals
public static IEnumerable<Interval<T>> Overlap<T>(IEnumerable<Interval<T>> left, Interval<T> right)T
left IEnumerable<Interval<T>>
right Interval<T>
IEnumerable<Interval<T>>
Returns the intersection of the specified and intervals
public static IEnumerable<Interval<T>> Overlap<T>(Interval<T> left, IEnumerable<Interval<T>> right)T
left Interval<T>
right IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the intersection of the specified and intervals
public static IEnumerable<Interval<T>> Overlap<T>(Interval<T> left, Interval<T> right)T
left Interval<T>
right Interval<T>
IEnumerable<Interval<T>>
Rounds a to a interval aligned to , and uses the specified rounding convention for midpoint values.
public static GranularInterval<DateTime> Round(Interval<DateTime> interval, TimeSpan granuleSize, MidpointRounding midpointRounding)interval Interval<DateTime>
granuleSize TimeSpan
midpointRounding MidpointRounding
Rounds a to a interval aligned to month, and uses the specified rounding convention for midpoint values.
public static GranularInterval<DateTime> RoundToMonth(Interval<DateTime> interval, MidpointRounding midpointRounding)interval Interval<DateTime>
midpointRounding MidpointRounding
Rounds a to a interval aligned to quarter, and uses the specified rounding convention for midpoint values.
public static GranularInterval<DateTime> RoundToQuarter(Interval<DateTime> interval, MidpointRounding midpointRounding)interval Interval<DateTime>
midpointRounding MidpointRounding
Rounds a to a interval aligned to half-year, and uses the specified rounding convention for midpoint values.
public static GranularInterval<DateTime> RoundToHalfYear(Interval<DateTime> interval, MidpointRounding midpointRounding)interval Interval<DateTime>
midpointRounding MidpointRounding
Rounds a to a interval aligned to year, and uses the specified rounding convention for midpoint values.
public static GranularInterval<DateTime> RoundToYear(Interval<DateTime> interval, MidpointRounding midpointRounding)interval Interval<DateTime>
midpointRounding MidpointRounding
Splits the interval into sub-intervals of length and the rest, which was less than in length
public static IEnumerable<GranularInterval<DateTime>> Split(Interval<DateTime> interval, TimeSpan granuleSize)interval Interval<DateTime>
granuleSize TimeSpan
IEnumerable<GranularInterval<DateTime>>
Splits the interval into sub-intervals of length and the rest, which was less than in length
public static IEnumerable<GranularInterval<DateTime>> SplitByMonths(Interval<DateTime> interval, int monthsCount)interval Interval<DateTime>
monthsCount Int32
IEnumerable<GranularInterval<DateTime>>
Splits the interval into sub-intervals of length and the rest, which was less than in length
public static IEnumerable<GranularInterval<DateTime>> SplitByQuarters(Interval<DateTime> interval, int quartersCount)interval Interval<DateTime>
quartersCount Int32
IEnumerable<GranularInterval<DateTime>>
Splits the interval into sub-intervals of length and the rest, which was less than in length
public static IEnumerable<GranularInterval<DateTime>> SplitByHalfYears(Interval<DateTime> interval, int halfYearsCount)interval Interval<DateTime>
halfYearsCount Int32
IEnumerable<GranularInterval<DateTime>>
Splits the interval into sub-intervals of length and the rest, which was less than in length
public static IEnumerable<GranularInterval<DateTime>> SplitByYears(Interval<DateTime> interval, int yearsCount)interval Interval<DateTime>
yearsCount Int32
IEnumerable<GranularInterval<DateTime>>
Returns the difference between the specified and intervals
public static IEnumerable<Interval<T>> Subtract<T>(IEnumerable<Interval<T>> left, IEnumerable<Interval<T>> right)T
left IEnumerable<Interval<T>>
right IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the difference between the specified and intervals
public static IEnumerable<Interval<T>> Subtract<T>(IEnumerable<Interval<T>> left, Interval<T> right)T
left IEnumerable<Interval<T>>
right Interval<T>
IEnumerable<Interval<T>>
Returns the difference between the specified and intervals
public static IEnumerable<Interval<T>> Subtract<T>(Interval<T> left, IEnumerable<Interval<T>> right)T
left Interval<T>
right IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the difference between the specified and intervals
public static IEnumerable<Interval<T>> Subtract<T>(Interval<T> left, Interval<T> right)T
left Interval<T>
right Interval<T>
IEnumerable<Interval<T>>
Returns the symmetric difference between the specified intervals
public static IEnumerable<Interval<T>> SymmetricDifference<T>(IEnumerable<Interval<T>> enumerable)T
enumerable IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the symmetric difference between the specified and intervals
public static IEnumerable<Interval<T>> SymmetricDifference<T>(IEnumerable<Interval<T>> left, IEnumerable<Interval<T>> right)T
left IEnumerable<Interval<T>>
right IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the symmetric difference between the specified and intervals
public static IEnumerable<Interval<T>> SymmetricDifference<T>(IEnumerable<Interval<T>> left, Interval<T> right)T
left IEnumerable<Interval<T>>
right Interval<T>
IEnumerable<Interval<T>>
Returns the symmetric difference between the specified and intervals
public static IEnumerable<Interval<T>> SymmetricDifference<T>(Interval<T> left, IEnumerable<Interval<T>> right)T
left Interval<T>
right IEnumerable<Interval<T>>
IEnumerable<Interval<T>>
Returns the symmetric difference between the specified and intervals
public static IEnumerable<Interval<T>> SymmetricDifference<T>(Interval<T> left, Interval<T> right)T
left Interval<T>
right Interval<T>
IEnumerable<Interval<T>>