import java.util.*; import java.text.*; public class Test { public static void main(String[] args) { GregorianCalendar worldTour = new GregorianCalendar(); worldTour.add(GregorianCalendar.DATE, 100); // 当前日期加100天 Date d = worldTour.getTime(); DateFormat df = DateFormat.getDateInstance(); String s = df.format(d); System.out.println("100天后的日期是:" + s); } }
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/10868.html