JS:
var date = new Date();
date.setMonth(date.getMonth()-3);
alert(date.format('dd/MM/yyyy hh:mm:ss'));
Java:
Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH) + 1;
int day = calendar.get(Calendar.DAY_OF_MONTH);
int time = calendar.get(Calendar.HOUR_OF_DAY);// 获取当前小时
int min = calendar.get(Calendar.MINUTE);// 获取当前分钟