package com.dev.swms.server.action.formatter;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import com.dev.energy.server.format.Formatter;
import com.dev.swms.server.utils.DateUtil;

public class JinSellDayFormatter implements Formatter{
	public String format(String property, Object storageDate, List origenData,
			String referenceModel, String locale) {
		int day=0;
		if(storageDate==null){
			return "";
		}
		day=DateUtil.getMargin(storageDate.toString(), DateUtil.getDate());
		if(day<=7){
			return "<div style='background-color:red' >" + storageDate + "</div>";
		}else{
			return storageDate + "";
		}
	}
}
