<<  < 2013 - >  >>
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30




类:CalendarUtil   类:Calendar
类:SimpleDateFormat 
得到今天早上0时0分0秒到明天早上0时0分0秒之间的时间如下:
//得到今天的日期
String starttime = calendarUtil.getNowDate();
try{
     Date startdate = simpledateFormat.parse(starttime );
}catch(){
}
//得到明天的日期
String tomorrowtime = calendarUtil.getTomorrowDate();
try{
     Date  tomorrowdate = simpledateFormat.parse(tomorrowtime 
}catch(){
}

日期加一天:
DateUtils.addDays(enddate,1);
  • 标签:java 时间 
    发表评论:
    天涯博客欢迎您!