テーブル内のWeb ページをCalendar
出力する Javaを作成しようとしていますが、特定の年の特定の月の日数を取得しようとすると問題が発生しました。html
Calendar
これは私が使用しているコードのビットです:
//accept input from command prompt in form of MONTH, DAY, YEAR
String date = args[0];
SimpleDateFormat df = new SimpleDateFormat("MMMM dd, yyyy");
Date convertedDate = new Date();
try
{
convertedDate = df.parse(date);
}
catch(Exception e)
{
System.out.print(e);
}
Calendar cal = Calendar.getInstance();
cal.setTime(convertedDate);
year = cal.get(Calendar.YEAR);
month = cal.get(Calendar.MONTH);
day = cal.get(Calendar.DAY_OF_MONTH);
//get number of days in month
int numDays, startMonth;
numDays = cal.getActualMaximum(DAY_OF_MONTH);
そして、最後の行から次のエラーが表示されます。
error: cannot find symbol and it points to the DAY_OF_MONTH variable.
どうすればこれを解決できますか?