Java学习笔记整理-时间工具整理

一.Date 定义:Date date=new Date();//获取系统当前时间 格式定义:1.传一个构造器DateFormat;2.定义一个格数 例如: DateFormat df=new SimpleDateFormat(“yyyy/MM/dd HH:mm:ss”) String str=df.format(d1) 相关方法: 1.after(Date when)测试此日期是否在指定日期之后
相关文章
相关标签/搜索