Table of Contents

Method ToScheduleDateOnly

Namespace
KZDev.PrimeTime
Assembly
KZDev.PrimeTime.dll

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

time IPrimeTime
instant Instant

The 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

time is null.

ArgumentException

time is 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

time IPrimeTime
zonedDateTime ZonedDateTime

A 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

time is null.

ArgumentException

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