Click or drag to resize
IDfsNonEqCalendarAxis Methods

The IDfsNonEqCalendarAxis type exposes the following members.

Extension Methods
  NameDescription
Public Extension MethodEndDateTime
Get the end date time for a non-equidistant calendar axis.
(Defined by DfsExtensions.)
Public Extension MethodGetDateTimes
Return an array of DateTimes which are the times for each timestep.

For non-equidistant axis, only the first and the last time are populated correctly. The rest are populated with MinValue.

For time type axis, first time is StartTimeOffsetInSeconds(IDfsTemporalAxis) after MinValue.

(Defined by DfsExtensions.)
Public Extension MethodGetRelativeSeconds
Return an array of doubles which are the the number of seconds since the start time for each timestep.

For non-equidistant axis, only the first and the last time are populated correctly. The rest are populated with -1

For time type axis, first time is StartTimeOffsetInSeconds(IDfsTemporalAxis)

(Defined by DfsExtensions.)
Public Extension MethodIsCalendar
Returns true if the temporal axis is a calendar axis
(Defined by DfsExtensions.)
Public Extension MethodIsEquidistant
Returns true if the temporal axis is equidistant.
(Defined by DfsExtensions.)
Public Extension MethodStartTimeOffsetInSeconds
Return the start time offset in seconds
(Defined by DfsExtensions.)
Public Extension MethodTimeSpan
Time span of all data in file, in unit described by TimeUnit.

The StartTimeOffset is not included in the span. The span starts at the time of the StartTimeOffset

Convenience method that returns/calculates the time span consistently for all types of time axes,

(Defined by DfsExtensions.)
Public Extension MethodTimeSpanAsTimeSpan
Calculate the time span as a System.TimeSpan
(Defined by DfsExtensions.)
Public Extension MethodTimeSpanInSeconds
Calculate the time span in seconds
(Defined by DfsExtensions.)
Public Extension MethodTimeStepInSeconds
Calculate the time step in seconds for an equidistant temporal axis.

If the time axis is not equidistant, zero is returned.

If the time axis unit can not be converted to seconds, an exception is thrown

(Defined by DfsExtensions.)
Public Extension MethodToDateTime
Returns the relativeTime as a DateTime. The time axis must be a calendar type axis.
(Defined by DfsExtensions.)
Public Extension MethodToRelativeSeconds
Returns the dateTime in relative seconds from the start time of the time axis, in the unit used by the file. The time axis must be a calendar type axis.

Note that for the equidistant axes, the first time step may be offset (see StartTimeOffset), however the time returned here is relative to the start time and not the first time step. This is matching the time returned by the read methods (Time).

(Defined by DfsExtensions.)
Public Extension MethodToRelativeTime(Double)Overloaded.
Converts a time value in seconds to a time value in the unit of the temporal axis.
(Defined by DfsExtensions.)
Public Extension MethodToRelativeTime(DateTime)Overloaded.
Returns the dateTime in relative time from the start time of the time axis, in the unit used by the file. The time axis must be a calendar type axis.

Note that for the equidistant axes, the first time step may be offset (see StartTimeOffset), however the time returned here is relative to the start time and not the first time step. This is matching the time returned by the read methods (Time).

(Defined by DfsExtensions.)
Public Extension MethodToSeconds
Converts a time value in the unit of the temporal axis (TimeUnit) to a time value in seconds.
(Defined by DfsExtensions.)
Public Extension MethodToSecondsFactor
Returns a factor for converting from a time value in the specified time unit to a time value in seconds.

For month and year time units, the factor is not uniquely defined, and may not return the value you want to use.

(Defined by DfsExtensions.)
Top
See Also