Date todayTime = new DateTime().withTimeAtStartOfDay().toDate();//今天凌晨
Date tomorrowTime = new DateTime().plusDays(1).withTimeAtStartOfDay().toDate();//昨日凌晨
Date theWeekStartTime = new DateTime().minusDays(new DateTime().getDayOfWeek()-1).withTimeAtStartOfDay().toDate();//本周开始时间
Date theWeekEndTime = new DateTime().plusDays(8-new DateTime().getDayOfWeek()).withTimeAtStartOfDay().toDate();//本周结束时间
Date theMonthStartTime = new DateTime().minusDays(new DateTime().getDayOfMonth()-1).withTimeAtStartOfDay().toDate();//本月开始时间
Date theMonthEndTime = new DateTime().minusDays(new DateTime().getDayOfMonth()-1).plusMonths(1).withTimeAtStartOfDay().toDate();//本月结束时间
DateTime使用
最新推荐文章于 2023-08-29 20:00:00 发布