You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given code like following (used in Android), is there way right now to do something equivalent in shared Kotlin Multiplatform code using Kotlinx Datetime (given a LocalDateTime)
val date = df.parse(startDate)
val timeFormatter = SimpleDateFormat("HH:mm")
return timeFormatter.format(date)
The text was updated successfully, but these errors were encountered:
No, there's no multiplatform way to format date and time with custom formats, only ISO-8601 is supported out of the box.
The current workaround is to declare expect formatting functions and implement them with those actual formatting API available in the target platforms.
You can follow issues labelled with the
formattersRelated to parsing and formatting
label to track the state of formatting support in this library.
Given code like following (used in Android), is there way right now to do something equivalent in shared Kotlin Multiplatform code using Kotlinx Datetime (given a
LocalDateTime
)The text was updated successfully, but these errors were encountered: