Table of Contents

Method ToScheduleLocalWallDateTime

Namespace
KZDev.PrimeTime
Assembly
KZDev.PrimeTime.dll

ToScheduleLocalWallDateTime(IPrimeTime, Instant)

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

public static DateTime ToScheduleLocalWallDateTime(this IPrimeTime time, Instant instant)

Parameters

time IPrimeTime
instant Instant

The absolute instant on the UTC timeline.

Returns

DateTime

Local wall date and time as DateTime, suitable for persistence patterns that store schedule-local wall time without DateTimeKind.

Exceptions

ArgumentNullException

time is null.

ArgumentException

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

ToScheduleLocalWallDateTime(IPrimeTime, ZonedDateTime)

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

public static DateTime ToScheduleLocalWallDateTime(this IPrimeTime time, ZonedDateTime zonedDateTime)

Parameters

time IPrimeTime
zonedDateTime ZonedDateTime

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

Returns

DateTime

Local wall date and time as DateTime.

Exceptions

ArgumentNullException

time is null.

ArgumentException

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