import java.util.Date; public class DateDSLExample { public static void main(String[] args) { Date now = new Date(); Date tomorrow = DateDSL.create().addDays(1).toDate(); int daysDiff = DateDSL.between(now, tomorrow).inDays(); boolean isSameDay = DateDSL.equals(now, tomorrow); boolean isBefore = DateDSL.before(now, tomorrow); } }


上一篇:
下一篇:
切换中文