Table of Contents

Struct DayTime

Namespace
Cavok
Assembly
Cavok.dll

A day of the month with a UTC time, as used for METAR observation times and TAF issue times (for example 211125Z). Reports do not contain the month or year.

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

Constructors

DayTime(int, int, int)

A day of the month with a UTC time, as used for METAR observation times and TAF issue times (for example 211125Z). Reports do not contain the month or year.

public DayTime(int Day, int Hour, int Minute)

Parameters

Day int

Day of the month, 1–31.

Hour int

Hour, 0–23 (hour 24 only occurs in forecast periods, see DayHour).

Minute int

Minute, 0–59.

Properties

Day

Day of the month, 1–31.

public int Day { get; init; }

Property Value

int

Hour

Hour, 0–23 (hour 24 only occurs in forecast periods, see DayHour).

public int Hour { get; init; }

Property Value

int

Minute

Minute, 0–59.

public int Minute { get; init; }

Property Value

int

Methods

ToDateTimeOffset(DateTimeOffset)

Resolves the day and time to a full UTC timestamp. Of the months around reference in which Day exists, the one giving the timestamp closest to reference is used, so month and year boundaries are handled.

public DateTimeOffset ToDateTimeOffset(DateTimeOffset reference)

Parameters

reference DateTimeOffset

A moment close to the report, typically the moment it was received.

Returns

DateTimeOffset

The resolved UTC timestamp.

Exceptions

ArgumentOutOfRangeException

Day is not between 1 and 31, or reference (in UTC) lies in January or February of year 1 or in December 9999, so that a month around it falls outside the range of DateTimeOffset.