Struct TimeOnly
Represents a time of day within the range 00:00:00 to 23:59:59, with a resolution of 1 second.
Namespace: Esri.ArcGISRuntime
Assembly: Esri.ArcGISRuntime.dll
Syntax
public readonly struct TimeOnly : IComparable, IComparable<TimeOnly>, IEquatable<TimeOnly>
Remarks
This type is a compatibility shim for System.TimeOnly
for projects targeting .NET Framework and UWP.
Constructors
Name | Description |
---|---|
TimeOnly(Int32, Int32, Int32) | Initializes a new instance of the TimeOnly struct with the specified hour, minute, and seconds. |
Properties
Name | Description |
---|---|
Hour | Gets the hour component of the time. |
Minute | Gets the minute component of the time. |
Second | Gets the second component of the time. |
Methods
Name | Description |
---|---|
CompareTo(TimeOnly) | |
CompareTo(Object) | |
Equals(TimeOnly) | |
Equals(Object) | |
FromDateTime(DateTime) | Converts System.DateTime to TimeOnly. Date component is dropped in the conversion, and time component is truncated to the nearest second. |
FromTimeSpan(TimeSpan) | Converts System.TimeSpan to TimeOnly. Only timespans between 0 and +24 hours are supported, and sub-second precision is lost. |
GetHashCode() | |
Parse(String) | Creates a new TimeOnly struct that represents the given ISO 8601 time string (HH:MM:SS). |
ToString() | |
ToTimeSpan() | Converts TimeOnly to System.TimeSpan. |
Operators
Name | Description |
---|---|
Equality(TimeOnly, TimeOnly) | Checks if two TimeOnly instances are equal. |
GreaterThan(TimeOnly, TimeOnly) | Checks if left TimeOnly instance is greater than the right one. |
GreaterThanOrEqual(TimeOnly, TimeOnly) | Checks if left TimeOnly instance is greater than or equal to the right one. |
Inequality(TimeOnly, TimeOnly) | Checks if two TimeOnly instances are not equal. |
LessThan(TimeOnly, TimeOnly) | Checks if left TimeOnly instance is less than the right one. |
LessThanOrEqual(TimeOnly, TimeOnly) | Checks if left TimeOnly instance is less than or equal to the right one. |
Applies to
Target | Versions |
---|---|
.NET Framework | 200.4 - 200.6 |
UWP | 200.4 - 200.6 |