安卓:DateFormat.getBestDateTimePattern API级别< 18更换 [英] Android: DateFormat.getBestDateTimePattern API Level < 18 replacement

查看:953
本文介绍了安卓:DateFormat.getBestDateTimePattern API级别< 18更换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<一个href="http://developer.android.com/reference/android/text/format/DateFormat.html#getBestDateTimePattern(java.util.Locale,%20java.lang.String)"相对=nofollow> 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通过<库 href="https://android.googlesource.com/platform/libcore/+/jb-mr2-release/luni/src/main/native/libcore_icu_ICU.cpp"相对=nofollow> JNI绑定,特别是它的<一个href="http://icu-project.org/apiref/icu4c/classicu_1_1DateTimePatternGenerator.html#a41a97e72ded1cd3f8257946cfe01c222"相对=nofollow> ICU :: DateTimePatternGenerator :: getBestPattern() 功能。

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

这篇关于安卓:DateFormat.getBestDateTimePattern API级别&LT; 18更换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆