Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR); // 年
int month = calendar.get(Calendar.MONTH) + 1; // 月
int day = calendar.get(Calendar.DATE); // 日
int hour = calendar.get(Calendar.HOUR_OF_DAY); // 時
int minute = calendar.get(Calendar.MINUTE); // 分
int second = calendar.get(Calendar.SECOND); // 秒
年月日 时分秒的取得
最新推荐文章于 2024-06-30 03:09:41 发布