<dependencies> <dependency> <groupId>com.github.spotbugs</groupId> <artifactId>moment</artifactId> </dependency> </dependencies> import com.github.moment.Moment; Moment moment = Moment.now(); String formattedDate = moment.format("yyyy-MM-dd"); Moment newMoment = moment.add(1, TimeUnit.DAY); boolean isAfter = moment.isAfter(newMoment); System.out.println(formattedDate); System.out.println(isAfter);


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