DateRangeToOffset Method

Converts the value of the current DateRange object to the date range specified by an offset value.

Definition

Namespace: InnerDrive.Core
Assembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.2.9017.0
C#
public DateRange ToOffset(
	TimeSpan offset
)

Parameters

offset  TimeSpan
The offset to convert the DateRange value to.

Return Value

DateRange
A DateRange object that is equal to the original DateRange object; that is, the Upper and Lower members return identical points of time, but whose Offset properties are set to offset

Exceptions

ArgumentExceptionThe resulting Upper or Lower members have unrepresentable DateTimeOffset values.
ArgumentOutOfRangeExceptionoffset is greater than 14 hours

- or -

offset is less than -14 hours

See Also