Class PortrayalTime
The time a map shows, for drawing instructions that are only valid at some times: one instant, or a range when the mariner views a period (S-98 §12.8.1). Dates and times without an offset are read in Zone.
public sealed record PortrayalTime : IEquatable<PortrayalTime>
- Inheritance
-
PortrayalTime
- Implements
- Inherited Members
Constructors
PortrayalTime(DateTimeOffset, DateTimeOffset, TimeZoneInfo)
The time a map shows, for drawing instructions that are only valid at some times: one instant, or a range when the mariner views a period (S-98 §12.8.1). Dates and times without an offset are read in Zone.
public PortrayalTime(DateTimeOffset Start, DateTimeOffset End, TimeZoneInfo Zone)
Parameters
StartDateTimeOffsetThe view time, or the start of the viewed range.
EndDateTimeOffsetThe end of the viewed range; Start for one instant.
ZoneTimeZoneInfoThe time zone calendar dates and times of day are read in. A host passes the zone it shows times in (the machine's zone or UTC), never the local time of the chart.
Properties
End
The end of the viewed range; Start for one instant.
public DateTimeOffset End { get; init; }
Property Value
Start
The view time, or the start of the viewed range.
public DateTimeOffset Start { get; init; }
Property Value
Zone
The time zone calendar dates and times of day are read in. A host passes the zone it shows times in (the machine's zone or UTC), never the local time of the chart.
public TimeZoneInfo Zone { get; init; }
Property Value
Methods
At(DateTimeOffset, TimeZoneInfo?)
One instant, with dates read in zone (UTC when null).
public static PortrayalTime At(DateTimeOffset time, TimeZoneInfo? zone = null)
Parameters
timeDateTimeOffsetThe view time.
zoneTimeZoneInfoThe time zone dates are read in.
Returns
- PortrayalTime
The portrayal time.
Between(DateTimeOffset, DateTimeOffset, TimeZoneInfo?)
A viewed range, with dates read in zone (UTC when null).
public static PortrayalTime Between(DateTimeOffset start, DateTimeOffset end, TimeZoneInfo? zone = null)
Parameters
startDateTimeOffsetThe start of the range.
endDateTimeOffsetThe end of the range; swapped with
startwhen earlier.zoneTimeZoneInfoThe time zone dates are read in.
Returns
- PortrayalTime
The portrayal time.