Click or drag to resize

TimeInterval Class

An interval defined by a start date and a stop date. The end points are optionally included in the interval.
Inheritance Hierarchy
SystemObject
  AGI.Foundation.TimeTimeInterval

Namespace:  AGI.Foundation.Time
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public sealed class TimeInterval : IEquatable<TimeInterval>, 
	IEquatableEpsilon<TimeInterval>

The TimeInterval type exposes the following members.

Constructors
  NameDescription
Public methodTimeInterval(JulianDate, JulianDate)
Initializes a new interval with the specified start date and stop date. The new interval is closed, meaning that both end points are included.
Public methodTimeInterval(JulianDate, JulianDate, Boolean, Boolean)
Initializes a new interval with the specified start date, stop date, and data, also specifying whether the start and stop dates are included.
Top
Properties
  NameDescription
Public propertyStatic memberEmpty
Gets an empty interval.
Public propertyStatic memberInfinite
Gets an interval that represents the maximum possible span of time.
Public propertyIsEmpty
Gets a value indicating whether the interval is empty. Emptiness is defined as either the stop time comes before the start time, or the interval represents zero duration with exclusive endpoints. To determine if the amount of time contained in an interval is zero, convert to a duration using ToDuration and check for equality with Zero.
Public propertyIsStartIncluded
Gets a value indicating whether the Start date is included in the interval.
Public propertyIsStopIncluded
Gets a value indicating whether the Stop date is included in the interval.
Public propertyStart
Gets the start date of the interval.
Public propertyStop
Gets the stop date of the interval.
Top
Methods
  NameDescription
Public methodAdd(TimeInterval)
Adds two intervals together, producing an interval list that includes both intervals.
Public methodAdd(TimeIntervalCollection)
Adds an interval list to this interval, producing a new interval list that includes this interval plus all intervals in the input list. The input list is not changed by this method.
Public methodAddDataT
Public methodContains
Determines if the interval contains a specified date.
Public methodEquals(Object)
Indicates whether another object is exactly equal to this instance.
(Overrides ObjectEquals(Object).)
Public methodEquals(TimeInterval)
Indicates whether another instance of this type is exactly equal to this instance.
Public methodEqualsEpsilon
Determines if this time interval is equal to another time interval, using an epsilon to compare the Start and Stop properties of the two intervals. The dates are considered equal if they are within epsilon seconds of each other. All other properties must be identical.
Public methodGetHashCode
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIntersect
Computes an interval which is the intersection of this interval with another.
Public methodToDuration
Returns a Duration representing the span of time between the Start and Stop of the interval.
Public methodToString
Returns a string with interval in the format "[Start, Stop)". Square brackets indicate that the end point of the interval is included in the intervals. Parenthesis indicate that the end point is not included.
(Overrides ObjectToString.)
Public methodToTimeStandard
Returns a TimeInterval equivalent to this one where the time standard of the start and end dates has been converted to the specified standard.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Returns if the two instances are exactly equal.
Public operatorStatic memberInequality
Returns if the two instances are not exactly equal.
Top
See Also