public static int convertHumanReadableStringIntoSeconds(
			String[] humanReadable) {

		int amount = -1;
		try {
			amount = Integer.parseInt(humanReadable[0]);
		} catch (final Exception e) {
			throw new RuntimeException("Could not parse string.", e);
		}
		final String unit = humanReadable[1];

		if ("minutes".equals(unit) || "minute".equals(unit)) {
			return amount * 60;
		} else if ("hours".equals(unit) || "hour".equals(unit)) {
			return amount * 3600;
		} else if ("days".equals(unit) || "day".equals(unit)) {
			return amount * 3600 * 24;
		} else if ("weeks".equals(unit) || "week".equals(unit)) {
			return amount * 3600 * 24 * 7;
		} else {
			// throw new RuntimeException(unit + " not a supported unit name.");
			return amount * 3600; // default
		}

	}