日期格式
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date myDate = new Date();
Date nowd = new Date();
long myTime = (myDate.getTime() / 1000) - 60 * 60 * 24 * 30;
myDate.setTime(myTime * 1000);
String mDate = formatter.format(myDate);
String now = formatter.format(nowd);
System.out.println(mDate);
System.out.println(now);