1 增加產品狀態
2 添加出發日日期顯示
2.1 日期轉換工具類
package com.tzb.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateUtils {
//日期轉換成字符串
public static String date2Str(Date date,String pattern){
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
String format = sdf.format(date);
return format;
}
// 字符串轉日期
public static Date str2Date(String dateStr,String pattern) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
Date date = sdf.parse(dateStr);
return date;
}
}