11
可能重複:
Find the number of days in a month in Java獲取的天數在當月在Java中
我知道這些都是一些方法來做到這一點,但我有很難找到信息如何在沒有通過指定日期的情況下完成。
我只想得到當前月份的天數,我該怎麼做?
可能重複:
Find the number of days in a month in Java獲取的天數在當月在Java中
我知道這些都是一些方法來做到這一點,但我有很難找到信息如何在沒有通過指定日期的情況下完成。
我只想得到當前月份的天數,我該怎麼做?
Calendar c = Calendar.getInstance();
int monthMaxDays = c.getActualMaximum(Calendar.DAY_OF_MONTH);
爲什麼你不想通過約會? – unholysampler 2012-01-11 15:05:09