Table of Contents

Method ToScheduleTimeOnly

Namespace
KZDev.PrimeTime
Assembly
KZDev.PrimeTime.dll

ToScheduleTimeOnly(IPrimeTime, Instant)

Maps an NodaTime.Instant to a TimeOnly wall time in the receiver's LocalScheduleDateTimeZone.

public static TimeOnly ToScheduleTimeOnly(this IPrimeTime time, Instant instant)

Parameters

time IPrimeTime
instant Instant

The absolute instant on the UTC timeline.

Returns

TimeOnly

The time of day in the schedule zone.

Remarks

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

Exceptions

ArgumentNullException

time is null.

ArgumentException

time is not an IPrimeClock and the schedule zone cannot be resolved.

ToScheduleTimeOnly(IPrimeTime, ZonedDateTime)

Converts a NodaTime.ZonedDateTime to a TimeOnly in the receiver's LocalScheduleDateTimeZone.

public static TimeOnly ToScheduleTimeOnly(this IPrimeTime time, ZonedDateTime zonedDateTime)

Parameters

time IPrimeTime
zonedDateTime ZonedDateTime

A zoned value in any zone; only its instant is used.

Returns

TimeOnly

The time of day in the schedule zone.

Remarks

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

Exceptions

ArgumentNullException

time is null.

ArgumentException

time is not an IPrimeClock and the schedule zone cannot be resolved.