//獲取當前時間
Date curdate = new Date(System.currentTimeMillis());
//日期數據定製格式
SimpleDateFormat bartDateFormat = new SimpleDateFormat("EEEE-MMMM-dd-yyyy");
Date date = new Date();
System.out.println(bartDateFormat.format(date));
“星期幾-月-日-年”輸出:“Sat-09-29-01”