为什么Calendar.get(Calendar.MONTH)返回0?
为什么以下返回0?
int currMonth = c.get(Calendar.MONTH);
月份编号从0(1月)到11(12月)。
参考:
-
Calendar.MONTH
不是自然索引,而是对太阳人的不自然的思考。 🙂
哎呀! 对不起 – 我明白了。 自然索引当然!!!
为什么以下返回0?
int currMonth = c.get(Calendar.MONTH);
月份编号从0(1月)到11(12月)。
参考:
Calendar.MONTH
不是自然索引,而是对太阳人的不自然的思考。 🙂
哎呀! 对不起 – 我明白了。 自然索引当然!!!