Learn From:http://blog.csdn.net/sunhuwh/article/details/39161323 public class CalendarTest { public static void main(String[] args) { // 获取当前年份.月份.日期 Calendar cale = null; cale = Calendar.getInstance(); int year = cale.get(Calendar.YEAR); int month =…
public class CalendarTest { public static void main(String[] args) { // 获取当前年份.月份.日期 Calendar cale = null; cale = Calendar.getInstance(); int year = cale.get(Calendar.YEAR); int month = cale.get(Calendar.MONTH) + 1; int day = cale.get(Calendar.DATE);…