Method ToScheduleTimeOnly
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
timeIPrimeTimeinstantInstantThe 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
timeis null.- ArgumentException
timeis 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
timeIPrimeTimezonedDateTimeZonedDateTimeA 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
timeis null.- ArgumentException
timeis not an IPrimeClock and the schedule zone cannot be resolved.