toLocalTime
Convert Calendar to LocalTime.
Since
1.1.0
Convert Date to LocalTime.
Since
1.1.0
Convert Instant to LocalTime.
Since
1.1.0
Convert LocalDateTime to LocalTime.
Since
1.1.0
Convert Long to LocalTime.
Example:
1_659_814_200_000.toLocalTime() // 00:00
Content copied to clipboard
Since
1.1.0
Produce a LocalTime from the given strings value and pattern.
Example:
"21->15->0".toLocalTime("HH->mm->ss") // 21:15
"Sun Aug 07 16:37:42 IRDT 2022".toLocalTime() // 16:37:42
"21:10:00".toLocalTime("HH::mm") // ParseException
Content copied to clipboard
Since
1.1.0
Return
A LocalTime parsed from the string.
See also
Throws
if the beginning of the specified string cannot be parsed.
IllegalArgumentException
if the given pattern is invalid