Calendar c = Calendar.getInstance();
c.setTime(cur); //设置时间
c.add(Calendar.MINUTE, 1); //日期分钟加1,Calendar.DATE(天),Calendar.HOUR(小时)
Date date = c.getTime(); //结果
Calendar cal = Calendar.getInstance();
cal.setTime(d1);
cal.add(Calendar.MINUTE, 30);
Date d2 = cal.getTime();
原文地址:https://www.cnblogs.com/Soy-technology/p/11011564.html
时间: 2024-10-24 07:30:49