我使用这段代码获取今天的日期并显示它
m_today = Calendar.getInstance();
现在我怎样才能得到下一个 3 个月的日期? 像这样:
2012 年 11 月 21 日至 2013 年 2 月 21 日
我可以显示第一部分,但如何显示第二部分?
最佳答案
这应该可以,
Calendar cal = Calendar.getInstance(); //Get the Calendar instance
cal.add(Calendar.MONTH,3);//Three months from now
cal.getTime();// Get the Date object
关于android - 如何获取下一个 3 个月的日期 Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13362186/