Method ToScheduleDateOnly
ToScheduleDateOnly(IPrimeTime, Instant)
Maps an NodaTime.Instant to a DateOnly in the receiver's LocalScheduleDateTimeZone.
public static DateOnly ToScheduleDateOnly(this IPrimeTime time, Instant instant)
Parameters
timeIPrimeTimeinstantInstantThe absolute instant on the UTC timeline.
Returns
- DateOnly
The calendar date 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.
ToScheduleDateOnly(IPrimeTime, ZonedDateTime)
Converts a NodaTime.ZonedDateTime to a DateOnly in the receiver's LocalScheduleDateTimeZone.
public static DateOnly ToScheduleDateOnly(this IPrimeTime time, ZonedDateTime zonedDateTime)
Parameters
timeIPrimeTimezonedDateTimeZonedDateTimeA zoned value in any zone; only its instant is used.
Returns
- DateOnly
The calendar date 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.