我来写笔记啦,直接上代码,简单易懂
Calendar ca = Calendar.getInstance();
int year = ca.get(Calendar.YEAR);
int month = ca.get(Calendar.MONTH)+1;
int day = ca.get(Calendar.DAY_OF_MONTH);
int hour = ca.get(Calendar.HOUR);
int min = ca.get(Calendar.MINUTE);
int s = ca.get(Calendar.SECOND);
int m = ca.get(Calendar.MILLISECOND);