<%@page language="java" contentType="application/json;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%!// Implement this method to execute some server-side logic.
	public JSONObject performLogic(JSONObject state, Map<String, String> additionalParams) throws Exception {
			
		JSONObject backendOutput = new JSONObject();			

		SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss aa");
		SimpleDateFormat sdf2 = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss aa");
		SimpleDateFormat sdf3 = new SimpleDateFormat("yyyyMMdd");
		backendOutput.put("IVR_End_Time", sdf.format(new Date()));
		backendOutput.put("Disposition_Date", sdf2.format(new Date()));
		backendOutput.put("Current_Date", sdf3.format(new Date()));
		
		SimpleDateFormat dateformat = new SimpleDateFormat("MMddyy");
		Calendar calobj = Calendar.getInstance();
		String[] days = new String[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
        "Saturday" };
		
		calobj.add(Calendar.DAY_OF_MONTH, 1);		
		
		if ((days[calobj.get(Calendar.DAY_OF_WEEK) - 1] == "Saturday"))
          {
 			calobj.add(Calendar.DAY_OF_MONTH, 2);
		  }
		if ((days[calobj.get(Calendar.DAY_OF_WEEK) - 1] == "Sunday"))
       	  {
			calobj.add(Calendar.DAY_OF_MONTH, 1);
		  }
		String WorkingDate = dateformat.format(calobj.getTime());
		backendOutput.put("dateforKO", WorkingDate);
		
		return backendOutput;

	};%>
<%@page import="org.json.JSONObject"%>
<%@page import="org.json.JSONException"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.Properties"%>
<%@page import="com.truist.app.properties.AppPropManager"%>
<%@page import="com.truist.app.config.MissingConfigurationException"%>
<%@page import="com.genesyslab.studio.backendlogic.BackendLogManager"%>
<%@include file="../include/appProps.jspf"%>