java日期

//今天上次的文件夹
String nowYearMonth = now.get(Calendar.YEAR) + ((now.get(Calendar.MONTH) + 1 < 10) ? "0"
+ (now.get(Calendar.MONTH) + 1) : "" + (now.get(Calendar.MONTH) + 1))
+ ((now.get(Calendar.DAY_OF_MONTH) < 10) ? "0" + (now.get(Calendar.DAY_OF_MONTH)) : ""
+ (now.get(Calendar.DAY_OF_MONTH)));
posted @ 2022-01-18 17:00  全琪俊  阅读(18)  评论(0)    收藏  举报