package com.dev.swms.server.service.bean;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

import com.dev.energy.server.service.bean.base.BaseParamBean;

public class InvalidDateSetting extends BaseParamBean{

	public Object getClientGlobalParamValue() {
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		Calendar cal = new GregorianCalendar();
		cal.setTime(new Date());
		int key = uniConfig.getGlobalParam("invalidAlertSetting").getInt();
		cal.add(Calendar.DATE , key);	
		return df.format(cal.getTime());
	}

	public Object getServerGlobalParamValue() {
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		Calendar cal = new GregorianCalendar();
		cal.setTime(new Date());
		int key = uniConfig.getGlobalParam("invalidAlertSetting").getInt();
		cal.add(Calendar.DATE , key);	
		return df.format(cal.getTime());
	}



}
