Click or drag to resize
TimeInterval Methods

The TimeInterval type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCreate(DateTime, DateTime)
Creates a time interval between the specified start and end date-times.
Public methodStatic memberCreate(Duration, IsoDateTime)
Creates a time interval with the specified duration ending at the specified end date-time.
Public methodStatic memberCreate(IsoDateTime, Duration)
Creates a time interval from the specified start date-time with the specified duration.
Public methodStatic memberCreate(IsoDateTime, IsoDateTime)
Creates a time interval between the specified start and end date-times.
Public methodStatic memberDay
Convenience method for returning a time interval covering a complete calendar day. The start date is expressed in local time.
Public methodDuration
Returns the duration of this time interval. If this interval was specified by start and end times, the duration is calculated given a local time zone. Note that if the duration is calculated, it will be specified in hours, minutes and seconds only. The number of hours may be very large for long intervals.
Public methodEnd
Returns the end point in time, given the time zone for local time.
Public methodEquals
True if the argument is a time interval specified by the very same components as this time interval. Two time intervals may cover the same set of time points in all time zones and for all locales and still not be considered equal, depending on how they are specified.
(Overrides ObjectEquals(Object).)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodStatic memberMonth
Convenience method for returning a time interval covering a complete calendar month. The start date is expressed in local time.
Public methodStatic memberParse
Parses a time interval on any of the three valid formats.
Public methodStatic memberQuarter
Convenience method for returning a time interval covering a complete calendar quarter. The start date is expressed in local time.
Public methodStart
Returns the start point in time, given the time zone for local time.
Public methodStatic memberToday
Convenience method for returning a time interval covering today. The start date is expressed in local time.
Public methodToString
Returns an ISO 8601 formatted string representing this time interval.
(Overrides ObjectToString.)
Public methodToTimeSpan
Returns the length in milliseconds for this time interval, given a local time zone.
Public methodStatic memberWeek
Convenience method for returning a time interval covering a complete calendar week according to the week rules defined by the specified locale. The start date is expressed in local time.
Public methodStatic memberYear
Convenience method for returning a time interval covering a complete calendar year. The start date is expressed in local time.
Top
See Also