class LocalTime
A time without a time-zone in the ISO-8601 calendar system, such as 10:30:05.
LocalTime is an immutable date-time object that represents a time, often viewed as hour-minute-second. Time is represented to nanosecond precision. For example, the value “13:45.30.123456789” can be stored in a LocalTime.
Members
Number day
Gets the second component of the time represented by the current instance, a number from 0 to 59.
Number hour
Gets the hour component of the time represented by the current instance, a number from 0 to 23.
Number minute
Gets the minute component of the time represented by the current instance, a number from 0 to 59.
Number nanosecond
Gets the nanoseconds component of the time represented by the current instance, a number from 0 to 999999999.
Constructor
LocalTime
(Long totalNanoseconds)
Creates a new instance of LocalTime.
Methods
compare
(LocalTime other)
Compares this LocalTime with the given one.
equals
(LocalTime other)
Returns true if the value of the LocalTime instance and other are the same
LocalTime.fromBuffer
(Buffer value)
Creates a new instance of LocalTime from the bytes representation.
- Static
- This function is static
Uses the provided local time (in milliseconds) and the nanoseconds to create a new instance of LocalTime
- Static
- This function is static
Uses the provided local time (in milliseconds) and the nanoseconds to create a new instance of LocalTime
- Static
- This function is static
LocalTime.fromString
(String value)
Parses an string representation and returns a new LocalDate.
- Static
- This function is static
getTotalNanoseconds
()Gets the total amount of nanoseconds since midnight for this instance.
LocalTime.now
([Number nanoseconds])
Uses the current local time (in milliseconds) and the nanoseconds to create a new instance of LocalTime
- Static
- This function is static
toBuffer
()Returns a big-endian bytes representation of the instance
toJSON
()Gets the string representation of the instance in the form: hh:MM:ss.ns
toString
()Returns the string representation of the instance in the form of hh:MM:ss.ns