判斷時間是否超過六個月

代碼1:java //當前時間比較一個時間超過六個月輸出1 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MONTH, -6); String time = sdf.format(cal.getTi
相關文章
相關標籤/搜索