The hour, 0 through 23.
The millisecond, 0 through 999.
The minute, 0 through 59.
The second, 0 through 59.
The remaining 100 nanosecond ticks below the millisecond, 0 through 9999. Carries the last four digits of
the seven-digit fraction a C# TimeOnly holds, so two times that differ below a millisecond stay different.
Static Readonly[typeDetermines whether this is the same time of day as another.
The other time.
True when they are the same time.
Gets the ISO-8601 representation used when this is serialized as JSON.
Without this, JSON.stringify falls back to enumerating hour, minute, second and
millisecond, so a request body carries a component object where the server expects the
scalar string.
The string.
Gets the ISO-8601 representation: HH:mm:ss, or HH:mm:ss.fff when there is a millisecond part, or the
full seven-digit HH:mm:ss.fffffff when there is a non-zero part below the millisecond. The seven-digit form
is padded, never trimmed, so the two fractional forms are the only ones produced; the parser accepts 1-7 digits.
The string.
StaticfromStaticparse
Represents a time of day with no date and no time zone.
Remarks
Deliberately not a JavaScript
Date. ADateneeds a date, and a time of day has none:new Date('14:30:45')is not an instant pinned to some default day, it isInvalid Date. The value is destroyed outright rather than merely shifted, which makes this the starker of the two temporal cases.