Time time = new Time("GMT+8");
time.setToNow();
int year = time.year;
int month = time.month ;
int day = time.monthDay;
月份总是少1,原因是月份值从0~11,所以月份取得时候,加1 就行了
int month = time.month +1 ;
Time time = new Time("GMT+8");
time.setToNow();
int year = time.year;
int month = time.month ;
int day = time.monthDay;
月份总是少1,原因是月份值从0~11,所以月份取得时候,加1 就行了
int month = time.month +1 ;