private static void colorButtonByPercentChangeAfterEarningsReport(
			CustomButton a, String dateInfo, String ticker) {

		String[] dates = dateInfo.split(" ");
		if (dates.length < 2) {
//			System.out.println("\n\nARRAY IS SHORT : " + dateInfo + "  -->  "
//					+ Arrays.toString(dates));
			return;
		}

		try {
			long earningsReportDate = EarningsTest.singleton.dateFormatForFile
					.parse(dates[1]).getTime() / 1000 / 3600 / 24;
			// int collectionDate = (int) Double.parseDouble(dates[0]);
			// TODO: COMPARE TO MARKET NOT ABSOLUTE
			int daysBefore = 10;
			int daysAfter = 2;
			float beforeReport = earningsReportDate - daysBefore;
			float afterReport = earningsReportDate + daysAfter;
			float marketFactor = Database.calculateMarketChange(beforeReport,
					afterReport);
			float change = Database.calculatePercentChange(
					Database.dbSet.indexOf(ticker), beforeReport, afterReport);
			// System.out.println("market calc: " + marketFactor);
			// System.out.println("change calc: " + change);
			change = change - marketFactor;
			int red = (int) (120 + change * 1);
			int green = (int) (140 + change * 1);
			int blue = (int) (140 + change * 3);
			if (red > 254)
				red = 255;
			if (green > 254)
				green = 255;
			if (blue > 254)
				blue = 255;
			if (red < 1)
				red = 1;
			if (green < 1)
				green = 1;
			if (blue < 1)
				blue = 1;
			a.setBackground(new Color(red, green, blue));
			String rename = a.getText() + change + " % v mkt -" + daysBefore
					+ ", +" + daysAfter + " days ";
			a.setText(rename);
		} catch (Exception e) {
		}
	}