TimeSeriesDataValueCreate Method |
Returns a non-null TimeSeriesDataValue object with the
specified value, percentage estimated, and date-time.
Namespace: DegreeDays.Api.DataAssembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax public static TimeSeriesDataValue Create(
double value,
double percentageEstimated,
DateTimeOffset dateTimeOffset
)
Public Shared Function Create (
value As Double,
percentageEstimated As Double,
dateTimeOffset As DateTimeOffset
) As TimeSeriesDataValue
Parameters
- value Double
- Indicating the value to be held by the returned
object (e.g. the temperature value).
- percentageEstimated Double
- A number, greater than or equal to zero and
less than or equal to 100, indicating the extent to which the
value is based on estimated data.
- dateTimeOffset DateTimeOffset
- The date-time of the time-series value.
As the Degree Days.net API provides date-times for time-series
data in YYYY-MM-DDThh:mm format (i.e. no seconds or
milliseconds), it is expected that this should not have seconds
or milliseconds either.
Return Value
TimeSeriesDataValueExceptions Exception | Condition |
---|
ArgumentOutOfRangeException | value is infinity,
or if percentageEstimated is less than 0 or greater
than 100. |
ArgumentException | value or
percentageEstimated is NaN, or if
dateTimeOffset is specified beyond the level of
minutes (e.g. it contains non-zero Second or Millisecond
values). |
See Also