wayf

2016年12月7日

将时区格式的时间转换为易于阅读的标准格式"yyyy-MM-dd"

摘要: Date的显示格式就是时区格式, String 标准格式 = new SimpleDateFormat("yyyy--MM--dd").format(new Date()); 阅读全文

posted @ 2016-12-07 14:53 Excalibr 阅读(174) 评论(0) 推荐(0) 编辑
在现有时间上增减一天,

摘要: Date date=new Date(); Calendar calendar = new Calendar.getInstance(); calendar.setTime(date); calendar.add(calendar.DATE,1);//将时间的天数与后一个值求和,正数增加,负数减少 阅读全文

posted @ 2016-12-07 14:48 Excalibr 阅读(103) 评论(0) 推荐(0) 编辑