import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date; public class DateUtil { public static void main(String[] args) { Date date = new Date(); SimpleDateFormat sdf = ne…
/** * 获得当前日期的前一天 */ function getYestoday(date){ var yesterday_milliseconds=date.getTime()-1000*60*60*24;//转换成毫秒后减去一天的毫秒数 // var yesterday = new Date(); // yesterday.setTime(yesterday_milliseconds); // // var strYear = yesterday.getFullYear(); // var…