humblehacker
08/12/2022, 8:52 PMLocalDate
, how do I format it as a localized string? java.time.LocalDate()
has a format()
method, but the kotlinx version doesn't, and so far my google searches are unsuccessful.mkrussel
08/12/2022, 8:56 PMhumblehacker
08/12/2022, 9:10 PMfun LocalDate.toJavaLocalDate(): java.time.LocalDate {
return java.time.LocalDate.ofEpochDay(this.toEpochDays().toLong())
}
someLocalDate.toJavaLocalDate().format(DateTimeFormatter.ofPattern("LLL dd"))
John O'Reilly
08/12/2022, 10:01 PMhumblehacker
08/12/2022, 10:06 PM