kotlinx-datetime
kotlinx-datetime copied to clipboard
DateTimeFormatter
Hi all,
I'm working on adding support for DateTimeFormatter
, it seems pretty straight forward for JVM
and JS
platforms and I'll open a PR soon for these two platforms. However, I haven't done much native stuff and was wondering if anyone have any ideas or thoughts for native implementation.
I noticed currently all of the native code is implemented around ISO_OFFSET_DATE_TIME
format, any ideas or thoughts on how to extend it to support other formats?
Hello @kprakash-dev ,
I'm also creating a DateTimeFormatter
(+ZonedDateTime
) on my own
You can take a look for the implementation of Apple targets.
ISO_OFFSET_DATE_TIME
can be easily translated as string pattern such as "YYYY-MM-dd'T'HH:mm:ssXXXX" (source: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_OFFSET_DATE_TIME)
Louis