Table of Contents

Class PrimeTimeScheduleZoneExtensions

Namespace
KZDev.PrimeTime
Assembly
KZDev.PrimeTime.dll

Projects absolute instants into the local schedule time zone carried by an IPrimeClock instance, using the same NodaTime.DateTimeZone as LocalScheduleDateTimeZone.

public static class PrimeTimeScheduleZoneExtensions
Inheritance
PrimeTimeScheduleZoneExtensions

Remarks

These extensions interpret the IPrimeTime receiver as IPrimeClock to read LocalScheduleDateTimeZone. Production and test clocks implement IPrimeClock; an IPrimeTime that is not a clock cannot resolve a schedule zone and is rejected.

Methods

ToScheduleDateOnly(IPrimeTime, Instant)

Maps an NodaTime.Instant to a DateOnly in the receiver's LocalScheduleDateTimeZone.

ToScheduleDateOnly(IPrimeTime, ZonedDateTime)

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

ToScheduleDateTimeOffset(IPrimeTime, Instant)

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

ToScheduleDateTimeOffset(IPrimeTime, ZonedDateTime)

Converts a NodaTime.ZonedDateTime to a DateTimeOffset for the wall time in the receiver's LocalScheduleDateTimeZone.

ToScheduleLocalDate(IPrimeTime, Instant)

Maps an NodaTime.Instant to the local calendar NodaTime.LocalDate in the receiver's LocalScheduleDateTimeZone.

ToScheduleLocalDate(IPrimeTime, ZonedDateTime)

Converts a NodaTime.ZonedDateTime to the local calendar NodaTime.LocalDate in the receiver's LocalScheduleDateTimeZone.

ToScheduleLocalDateTime(IPrimeTime, ZonedDateTime)

Converts a NodaTime.ZonedDateTime to the local wall-clock NodaTime.LocalDateTime in the receiver's LocalScheduleDateTimeZone.

ToScheduleLocalTime(IPrimeTime, Instant)

Maps an NodaTime.Instant to the local time-of-day NodaTime.LocalTime in the receiver's LocalScheduleDateTimeZone.

ToScheduleLocalTime(IPrimeTime, ZonedDateTime)

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

ToScheduleLocalWallDateTime(IPrimeTime, Instant)

Maps an NodaTime.Instant to a DateTime wall-clock value (unspecified kind) in the receiver's LocalScheduleDateTimeZone.

ToScheduleLocalWallDateTime(IPrimeTime, ZonedDateTime)

Converts a NodaTime.ZonedDateTime to a schedule-local DateTime wall-clock value (unspecified kind) in the receiver's LocalScheduleDateTimeZone.

ToScheduleTimeOnly(IPrimeTime, Instant)

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

ToScheduleTimeOnly(IPrimeTime, ZonedDateTime)

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

ToScheduleZonedDateTime(IPrimeTime, Instant)

Maps an NodaTime.Instant to a NodaTime.ZonedDateTime in the receiver's LocalScheduleDateTimeZone.

ToScheduleZonedDateTime(IPrimeTime, ZonedDateTime)

Converts a NodaTime.ZonedDateTime to an NodaTime.Instant and maps it into the receiver's LocalScheduleDateTimeZone.