android.text.format.DateFormat和java.text.DateFormat之间有什么区别? [英] What is the difference between android.text.format.DateFormat and java.text.DateFormat

查看:260
本文介绍了android.text.format.DateFormat和java.text.DateFormat之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在Android中格式化日期和时间?



人们建议使用 android.text.format.DateFormat 而不是 java.text.DateFormat



此外,在android中转换日期到字符串时也提到了一个问题:



Android加载时区太长:en_US加载的时区名称



我想知道 android.text.format.DateFormat java.text.DateFormat

解决方案

这里有一些自助服务?比较API,阅读JavaDocs并自己看看:




I read some posts on formatting date on android, like this:

How do you format date and time in Android?

People suggest use android.text.format.DateFormat rather than java.text.DateFormat,

Also here, it mention a problem when converting date to string in android:

Android load timezone too long: Loaded time zone names for en_US

I am wondering what's the difference between android.text.format.DateFormat and java.text.DateFormat?

解决方案

How about some self-help here? Compare the APIs, read the JavaDocs and see for yourself:

这篇关于android.text.format.DateFormat和java.text.DateFormat之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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