首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

时间处置

2012-09-05 
时间处理不同的国家有不同的时间格式:Locale currentLocale Locale.getDefault ()//获得当地的地区Date

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

热点排行