读书人

时间处置

发布时间: 2012-09-05 15:19:35 作者: rapoo

时间处理
不同的国家有不同的时间格式:
Locale currentLocale = Locale.getDefault ();
//获得当地的地区
DateFormat dateFormatter = DateFormat.getDateInstance (
DateFormat.DEFAULT, currentLocale);
Date today = new Date ();
String todayStr = dateFormatter.format (today);

读书人网 >编程

热点推荐