Table of Contents

Struct LocalTimeOfDay

Namespace
KZDev.SystemClock.PrimeTime
Assembly
KZDev.SystemClock.PrimeTime.dll

Represents a time of day in the local time zone, as a TimeOnly wrapper with semantic meaning for use in day-time timers and scheduling.

public readonly struct LocalTimeOfDay : IEquatable<LocalTimeOfDay>
Implements

Remarks

This type distinguishes local time-of-day from UtcTimeOfDay so that day-time timer registration APIs can require the correct interpretation without ambiguity.

Only supported in .NET 8+. Not supported in NetStandard 2.0.

Constructors

LocalTimeOfDay(TimeOnly)

Initializes a new instance of the LocalTimeOfDay struct from a TimeOnly value.

Properties

Value

Gets the underlying TimeOnly value.

Methods

Equals(LocalTimeOfDay)
Equals(object?)
GetHashCode()
ToLongTimeString()

Converts the value of the current LocalTimeOfDay instance to its equivalent long time string representation.

ToShortTimeString()

Converts the value of the current LocalTimeOfDay instance to its equivalent short time string representation.

ToString()

Converts the value of the current LocalTimeOfDay instance to its equivalent short time string representation using the formatting conventions of the current culture.

ToString(IFormatProvider?)

Converts the value of the current LocalTimeOfDay instance to its equivalent string representation using the specified culture-specific format information.

ToString(string?)

Converts the value of the current LocalTimeOfDay instance to its equivalent string representation using the specified format and the formatting conventions of the current culture.

ToString(string?, IFormatProvider?)

Converts the value of the current LocalTimeOfDay instance to its equivalent string representation using the specified format and culture-specific format information.

Operators

operator ==(LocalTimeOfDay, LocalTimeOfDay)

Returns a value indicating whether two LocalTimeOfDay instances are equal.

operator !=(LocalTimeOfDay, LocalTimeOfDay)

Returns a value indicating whether two LocalTimeOfDay instances are not equal.