Localizing month name using kotlinx-datetime library

193 Views Asked by At

I use the kotlinx-datetime library to get and compare with the user's current date.

I ran into a problem that:

SomeInstant.toLocalDateTime(TimeZone.currentSystemDefault()).month.name

Returns the name of the month in English, for example: January.

How can I change the month name for the user's locale? For example, janvier in French.


I want to use this library only, without resorting to java.time classes on the Java platform.

0

There are 0 best solutions below