最简单的时间格式类
import java.lang.*;
import java.text.*;
import java.util.*;
public class timeformat{
public timeformat(){
}
static public String getChineseFormatTime(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
return sdf.format(new Date());
}
static public String getSimpleFormatTime(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm", Locale.US);
return sdf.format(new Date());
}
}