- /**
- * 获得指定日期的后一天
- *
- * @param specifiedDay
- * @return
- */
- public static String getSpecifiedDayAfter(String specifiedDay) {
- Calendar c = Calendar.getInstance();
- Date date = null;
- try {
- date = new SimpleDateFormat("yy-MM-dd").parse(specifiedDay);
- } catch (ParseException e) {
- e.printStackTrace();
- }
- c.setTime(date);
- int day = c.get(Calendar.DATE);
- c.set(Calendar.DATE, day + 1);
- String dayAfter = new SimpleDateFormat("yyyy-MM-dd")
- .format(c.getTime());
- return dayAfter;
- }
java日期操作
最新推荐文章于 2024-01-03 14:22:47 发布