toLocalDate
Convert Calendar to LocalDate.
Since
1.1.0
Convert Date to LocalDate.
Since
1.1.0
Convert Instant to LocalDate.
Since
1.1.0
Convert Long to LocalDate.
Example:
1659814200000.toLocalDate() // 2022-07-07
Content copied to clipboard
Since
1.1.0
Produce a LocalDate from the given strings value and pattern.
Example:
"8/7/2022".toLocalDate("MM/dd/yyyy") // 2022-07-07
"Sun Aug 07 16:37:42 IRDT 2022".toLocalDate() // 2022-07-07
"7/2022".toLocalDate("MM/dd/yyyy") // ParseException
Content copied to clipboard
Since
1.1.0
Return
A LocalDate parsed from the string.
See also
Throws
if the beginning of the specified string cannot be parsed.
IllegalArgumentException
if the given pattern is invalid
Convert LocalDateTime to LocalDate.
Since
1.1.0