Table of Contents

Struct GribTimeRange

Namespace
EncDotNet.S100.Datasets.Grib
Assembly
EncDotNet.S100.Datasets.Grib.dll

A GRIB2 time range: a count of a unit from code table 4.4, for example a forecast time of 3 hours.

public readonly record struct GribTimeRange : IEquatable<GribTimeRange>
Implements
Inherited Members

Constructors

GribTimeRange(GribTimeUnit, int)

A GRIB2 time range: a count of a unit from code table 4.4, for example a forecast time of 3 hours.

public GribTimeRange(GribTimeUnit Unit, int Value)

Parameters

Unit GribTimeUnit

The unit.

Value int

The number of units; may be negative (a forecast time before the reference time).

Properties

Unit

The unit.

public GribTimeUnit Unit { get; init; }

Property Value

GribTimeUnit

Value

The number of units; may be negative (a forecast time before the reference time).

public int Value { get; init; }

Property Value

int

Methods

AddTo(DateTime)

Adds the range to time, calendar-aware for months and longer units.

public DateTime AddTo(DateTime time)

Parameters

time DateTime

The time to start from, usually the reference time.

Returns

DateTime

The time Value units after time.

Exceptions

UnsupportedGribException

The unit isn't one of code table 4.4's defined units.

ToString()

Returns the range as, for example, "3 h".

public override string ToString()

Returns

string