安卓:DateFormat.getBestDateTimePattern API级别< 18更换级别、getBestDateTimePattern、DateFormat、API

2023-09-07 22:02:31 作者:帝王挥剑指天下

getBestDateTimePattern()

所需的Andr​​oid API级别18,有没有合适的开源库,它作为一种有效的替代(比如我可以与乔达日期时间使用)?

Requires Android API Level 18, is there a suitable open source library (like I can use with Joda DateTime) which acts as an effective replacement?

推荐答案

在底层Android使用 ICU4C通过 JNI绑定,特别是它的 ICU :: DateTimePatternGenerator :: getBestPattern() 功能。

Under the hood Android uses the ICU4C library via JNI bindings and especially its icu::DateTimePatternGenerator::getBestPattern() function.