需求背景: 搜索的筛选条件为X个月内 过去X年
GregorianCalendar now = new GregorianCalendar();
now.add(GregorianCalendar.YEAR, -10);
Date date = now.getTime();
结果:Sat Feb 25 14:15:02 CST 2012
需求背景: 搜索的筛选条件为X个月内 过去X年
GregorianCalendar now = new GregorianCalendar();
now.add(GregorianCalendar.YEAR, -10);
Date date = now.getTime();
结果:Sat Feb 25 14:15:02 CST 2012