1ヶ月後の日付文字列を返す(yyyy/mm/dd)
年月日の数字を受け取って、1ヶ月後の日付(yyyy/mm/dd) を返す方法
public static String getNextMonthDay(int y, int m, int d){ Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); cal.set(y,m-1,d); //月は0〜11で渡す必要があるので -1. cal.add(Calendar.MONTH,1); return sdf.format( cal.getTime() ); }