[This is preliminary documentation and is subject to change.]
LocalTime is an immutable struct representing a time of day, with no reference
to a particular calendar, time zone or date.

C# | Visual Basic | Visual C++ |
public struct LocalTime : IEquatable<LocalTime>, IComparable<LocalTime>, IFormattable, IComparable, IXmlSerializable
Public Structure LocalTime _ Implements IEquatable(Of LocalTime), IComparable(Of LocalTime), _ IFormattable, IComparable, IXmlSerializable
public value class LocalTime : IEquatable<LocalTime>, IComparable<LocalTime>, IFormattable, IComparable, IXmlSerializable

All Members | Constructors | Methods | Properties | Fields | |
Icon | Member | Description |
---|---|---|
![]() | LocalTime(Int32, Int32) |
Creates a local time at the given hour and minute, with second, millisecond-of-second
and tick-of-millisecond values of zero.
|
![]() | LocalTime(Int32, Int32, Int32) |
Creates a local time at the given hour, minute and second,
with millisecond-of-second and tick-of-millisecond values of zero.
|
![]() | LocalTime(Int32, Int32, Int32, Int32) |
Creates a local time at the given hour, minute, second and millisecond,
with a tick-of-millisecond value of zero.
|
![]() | LocalTime(Int32, Int32, Int32, Int32, Int32) |
Creates a local time at the given hour, minute, second, millisecond and tick within millisecond.
|
![]() ![]() | Add(LocalTime, Period) |
Adds the specified period to the time. Friendly alternative to operator+().
|
![]() ![]() | Addition(LocalTime, Period) |
Creates a new local time by adding a period to an existing time. The period must not contain
any date-related units (days etc) with non-zero values.
|
![]() | ClockHourOfHalfDay |
Gets the hour of the half-day of this local time, in the range 1 to 12 inclusive.
|
![]() | CompareTo(LocalTime) |
Indicates whether this time is earlier, later or the same as another one.
|
![]() ![]() | Equality(LocalTime, LocalTime) |
Compares two local times for equality, by checking whether they represent
the exact same local time, down to the tick.
|
![]() | Equals(LocalTime) |
Compares this local time with the specified one for equality,
by checking whether the two values represent the exact same local time, down to the tick.
|
![]() | Equals(Object) |
Compares this local time with the specified reference. A local time is
only equal to another local time with the same underlying tick value.
(Overrides ValueType.Equals(Object).) |
![]() ![]() | FromHourMinuteSecondTick(Int32, Int32, Int32, Int32) |
Factory method for creating a local time from the hour of day, minute of hour, second of minute, and tick of second.
|
![]() ![]() | FromMillisecondsSinceMidnight(Int32) |
Factory method for creating a local time from the number of milliseconds which have elapsed since midnight.
|
![]() ![]() | FromSecondsSinceMidnight(Int32) |
Factory method for creating a local time from the number of seconds which have elapsed since midnight.
|
![]() ![]() | FromTicksSinceMidnight(Int64) |
Factory method for creating a local time from the number of ticks which have elapsed since midnight.
|
![]() | GetHashCode()()()() |
Returns a hash code for this local time.
(Overrides ValueType.GetHashCode()()()().) |
![]() ![]() | GreaterThan(LocalTime, LocalTime) |
Compares two LocalTime values to see if the left one is strictly later than the right
one.
|
![]() ![]() | GreaterThanOrEqual(LocalTime, LocalTime) |
Compares two LocalTime values to see if the left one is later than or equal to the right
one.
|
![]() | Hour |
Gets the hour of day of this local time, in the range 0 to 23 inclusive.
|
![]() ![]() | Inequality(LocalTime, LocalTime) |
Compares two local times for inequality.
|
![]() ![]() | LessThan(LocalTime, LocalTime) |
Compares two LocalTime values to see if the left one is strictly earlier than the right
one.
|
![]() ![]() | LessThanOrEqual(LocalTime, LocalTime) |
Compares two LocalTime values to see if the left one is earlier than or equal to the right
one.
|
![]() | LocalDateTime |
Returns a LocalDateTime with this local time, on January 1st 1970 in the ISO
calendar.
|
![]() ![]() | Midnight |
Local time at midnight, i.e. 0 hours, 0 minutes, 0 seconds.
|
![]() | Millisecond |
Gets the millisecond of this local time within the second, in the range 0 to 999 inclusive.
|
![]() | Minus(Period) |
Subtracts the specified period from this time. Fluent alternative to operator-().
|
![]() | Minute |
Gets the minute of this local time, in the range 0 to 59 inclusive.
|
![]() ![]() | Noon |
Local time at noon, i.e. 12 hours, 0 minutes, 0 seconds.
|
![]() | Plus(Period) |
Adds the specified period to this time. Fluent alternative to operator+().
|
![]() | PlusHours(Int64) |
Returns a new LocalTime representing the current value with the given number of hours added.
|
![]() | PlusMilliseconds(Int64) |
Returns a new LocalTime representing the current value with the given number of milliseconds added.
|
![]() | PlusMinutes(Int64) |
Returns a new LocalTime representing the current value with the given number of minutes added.
|
![]() | PlusSeconds(Int64) |
Returns a new LocalTime representing the current value with the given number of seconds added.
|
![]() | PlusTicks(Int64) |
Returns a new LocalTime representing the current value with the given number of ticks added.
|
![]() | Second |
Gets the second of this local time within the minute, in the range 0 to 59 inclusive.
|
![]() ![]() | Subtract(LocalTime, Period) |
Subtracts the specified period from the time. Friendly alternative to operator-().
|
![]() ![]() | Subtraction(LocalTime, Period) |
Creates a new local time by subtracting a period from an existing time. The period must not contain
any date-related units (days etc) with non-zero values.
|
![]() | TickOfDay |
Gets the tick of this local time within the day, in the range 0 to 863,999,999,999 inclusive.
|
![]() | TickOfSecond |
Gets the tick of this local time within the second, in the range 0 to 9,999,999 inclusive.
|
![]() | ToString()()()() |
Returns a String that represents this instance.
(Overrides ValueType.ToString()()()().) |
![]() | ToString(String, IFormatProvider) |
Formats the value of the current instance using the specified pattern.
|

This type is an immutable value type. See the thread safety section of the user guide for more information.
Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)