Replace our Date implementations using Klock library
Opened this issue · 2 comments
Instead of maintaining our own Date/DateTime implementations, we should instead use the open source multiplatform library https://github.com/korlibs/klock/ which should bring way more functionalities.
I'm guessing you looked at this as well : https://github.com/Kotlin/kotlinx-datetime. Any reason for not using the "first party" date library for kotlin ?
@guillaumeaudet That's a good question. Yes, we've looked into it and dicussed it here internally, and we went with Klock since It seems like date formatting is not supported (and not in scope) with kotlinx-datetime library.
As mentionned in their documentation :
The library is based on the ISO 8601 international standard, other ways to represent dates and times are out of its scope. Internationalization (such as locale-specific month and day names) is out the scope, too.
Since locale-specific date formatting is a common use-case fo our mobile apps, we felt like Klock would be a better choice (at least for now).
I personnaly prefer the "first-party" approach (on which we could add internationalization functionalities), but that's a decision we have to make as a team here :P
Thanks for bringing this up. 👍🏻