How to use the date format that has been setup as default in Settings?
2010-08-27 20:20
701 查看
Question:
As you probably know, you can setup date format in the Settings of an Android
device.
In code how do we make sure that we use that format for date display?
Answer:
Try
, notably
to get the
user's preferred date format.
Thanks:http://stackoverflow.com/questions/2835425/how-to-use-the-date-format-that-has-been-setup-as-default-in-settings
As you probably know, you can setup date format in the Settings of an Android
device.
In code how do we make sure that we use that format for date display?
Answer:
Try
android.text.format.DateFormat
, notably
getDateFormatOrder()
to get the
user's preferred date format.
Thanks:http://stackoverflow.com/questions/2835425/how-to-use-the-date-format-that-has-been-setup-as-default-in-settings
相关文章推荐
- How can I force Python's file.write() to use the same newline format in Windows as in Linux (“\r\n”
- How to use BTM as the transaction manager in Tomcat 6.x
- how to change the implicit default settings in django 1.6
- how to use a SQLite database in a standalone program with an HTML interface and VBScript as the programming language
- DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|c
- [quote]HowTo Format Date For Display or Use In a Shell Script
- HOW TO: Change the Owner of a User-Defined Data Type That Is in Use in SQL Server 2000
- How to restore an element that has been deleted in CCRC?
- How to fix the issue "A problem has been encountered while loading the setup components. Canceling setup"?
- How to be sure that message via socket.io has been received to the client?
- How to use Wise SetupCapture in the Wise Packager for Deployment Server to create an MSI
- How to format date for display or to use in a shell script
- Source Insight in Ubuntu+Windows+Samba:has been changed outside of the editor. Do you want to reload the file?
- How to use "man" effectively in the development of Linux
- location of the android sdk has not been setup in the preferences如何解决
- [TroubleShooting] The remote copy of database xx has not been rolled forward to a point in time
- How to use the new CSS syntax in Flex 4
- How do I write a LINQ to Entities query which has the equivalent of the SQL “in” keyword?
- [转]Newtonsoft JSON how to dynamically change the date format?
- How to Keep Your Skills Up-to-Date in the New Year(如何提升测试技能)