最简单的时间格式类
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());
}
}
posted on 2009-03-15 21:42 大鱼 阅读(93) 评论(0) 编辑 收藏 所属分类: j2se